Windows 7 Deleting Old System Files

Cheemag

Extraordinary Member
Hello again,

Possibly unusual problem: I had Windows 7 re-installed to C: recently by a computer shop.

I don't know how it happened, but some system files from the previous installation are on drive D: taking up over 8MB of space. I imagine this is the saved copy of the old system which they've put on D:. (I know they're from the previous installation by the dates - they're nothing to do with the new iteration of Windows).

Try as I may, I cannot delete these files either as Administrator or in Safe Mode. They either don't show at the Safe Mode/Admin command prompt or require Admin privileges in Total Commander/Explorer and even then won't delete.

Is there any way, apart from taking the disc out and deleting the directories by running the drive as an external USB drive ? (Windows 7 Professional 64-bit)

Regards,

Cheemag
 
Most likely not even the administrators group has access to delete them. Not to worry, Windows uses DACL permissions. This means the owner of a file or files can grant whatever access they want and anyone in the administrators group can take ownership of files. So basically it's a three step process. Take ownership, grant permissions then delete.
Assuming all the files you want to delete are in a directory on D called StupidDirectory

Open an elevated command prompt (Start button, type command prompt, hold shift+ctrl and click on 'Command Prompt')

Take ownership
  • takeown /F D:\StupidDirectory /A /R
Set Permissions
  • cacls D:\StupidDirectory /E /T /G Administrators:F
Remove directory
  • del /F /S /Q D:\StupidDirectory
 
Hello again,

Possibly unusual problem: I had Windows 7 re-installed to C: recently by a computer shop.

I don't know how it happened, but some system files from the previous installation are on drive D: taking up over 8MB of space. I imagine this is the saved copy of the old system which they've put on D:. (I know they're from the previous installation by the dates - they're nothing to do with the new iteration of Windows).

Try as I may, I cannot delete these files either as Administrator or in Safe Mode. They either don't show at the Safe Mode/Admin command prompt or require Admin privileges in Total Commander/Explorer and even then won't delete.

Is there any way, apart from taking the disc out and deleting the directories by running the drive as an external USB drive ? (Windows 7 Professional 64-bit)

Regards,

Cheemag
Most likely not even the administrators group has access to delete them. Not to worry, Windows uses DACL permissions. This means the owner of a file or files can grant whatever access they want and anyone in the administrators group can take ownership of files. So basically it's a three step process. Take ownership, grant permissions then delete.
Assuming all the files you want to delete are in a directory on D called StupidDirectory

Open an elevated command prompt (Start button, type command prompt, hold shift+ctrl and click on 'Command Prompt')

Take ownership
  • takeown /F D:\StupidDirectory /A /R
Set Permissions
  • cacls D:\StupidDirectory /E /T /G Administrators:F
Remove directory
  • del /F /S /Q D:\StupidDirectory

Many thanks, but I don't have a directory called StupidDirectory ! :eek:)

Actually I (think) I have ownership of the directory as I have a function 'Take Ownership' on my right-click Explorer context menu which I used on this errant folder, but I'll take the steps outlined above, before pulling the drive. When I next boot that machine. Probably later today. I'll post if it's successful.

Regards,

Cheemag
 
Many thanks, but I don't have a directory called StupidDirectory ! :eek:)

No success I'm afraid. This will explain:
The offending folder only shows up in Total Commander, not in Windows Explorer or at command prompt, but it is there.

D:\>cacls "D:\System Volume Information" /E /T /G Administrators:F
processed dir: D:\System Volume Information
processed dir: D:\System Volume Information\Chkdsk
processed file: D:\System Volume Information\ISwift3.dat
processed file: D:\System Volume Information\kliddb.dat
processed file: D:\System Volume Information\klmeta.dat
processed file: D:\System Volume Information\klobjdb.dat
processed file: D:\System Volume Information\MountPointManagerRemoteDatabase
processed dir: D:\System Volume Information\SPP
processed file: D:\System Volume Information\Syscache.hve.LOG1
processed file: D:\System Volume Information\Syscache.hve.LOG2
processed file: D:\System Volume Information\tracking.log
Access is denied.

D:\>dir
Volume in drive D has no label.
Volume Serial Number is DA4B-D621

Directory of D:\

20/03/2017 16:34 <DIR> Backups
20/03/2017 12:48 <DIR> BMarks
20/03/2017 12:09 <DIR> Data
20/03/2017 14:35 <DIR> Docs
10/02/2017 19:50 <DIR> Icons
19/03/2017 16:11 <DIR> Temp
10/02/2017 21:05 <DIR> WPapers
0 File(s) 0 bytes
7 Dir(s) 940,809,084,928 bytes free


D:\>del /F /S /Q "D:\System Volume Information"
Could Not Find D:\System Volume Information\*

** try calcs with /c argument **

D:\>cacls "D:\System Volume Information" /E /T /G Administrators /c
Invalid arguments.
NOTE: Cacls is now deprecated, please use Icacls.

*** Tried icalcs with various arguments, without success. ***

Regards,

Cheemag
 
I was using a made of directory as an example. You would just replace it for the real directory in question.
 
Ok the System Volume Information directory is going to be present on any NTFS formatted drive. You should never delete it.
 
Ok the System Volume Information directory is going to be present on any NTFS formatted drive. You should never delete it.

You are absolutely right - there's a half GB System Volume Info file on the D: drive of the other computer !!!
With hindsight it seems rather fortunate that I was unable to delete it.

I was using a made of directory as an example. You would just replace it for the real directory in question.

You must have missed the smiley, or it didn't translate.

Anyway, many thanks for saving my D: drive.

Regards

Cheemag
 
Back
Top