How to delete old pagefile.sys and hiberfile.sys on secondary disk (old windows install)

Solution 1:

The files are protected using NTFS ACLs. Use takeown to take ownership of them.

Solution 2:

Combining the answers it's quite simple, no external programs needed.

From a dos prompt: icacls hiberfil.sys /grant everyone:f to get access to the file attrib -h -s hiberfil.sys to make it visible for deletion del hiberfil.sys to delete the file

For pagefile.sys it works the same way.