I have a portable hard disk which at one time was installed in a PC and windows XP installed on it. Now I am using it as a backup and I want to delete the Windows directory from it, but when I try to delete the Windows directory I am getting an error that I cannot delete it. The hard disk is connected to my PC via USB. My PC boots from its own hard disk and has Windows Vista Business.

How can I delete these files from the portable hard disk?

link|improve this question
1  
The problem is probably the file permissions. See superuser.com/questions/111049/… and in particular the link to blogsdna.com/2159/… – Harry Johnston Nov 1 '11 at 20:16
feedback

migrated from stackoverflow.com Nov 1 '11 at 19:40

This question came from our site for professional and enthusiast programmers.

7 Answers

Right-click on the partition and select the Security-tab. Click Advanced.

First: Take ownership of the folder/partition (close all dialogs to apply the change, and Open it again). Second: Set Full-access for your account/All Users-account.

That should also work for Vista

link|improve this answer
feedback

The easiest way to clean off the hard drive is to reformat. Make sure you pull off the files you want to keep, and then just do a deep clean. You can put the files you pulled off back on later.

Chances are, Windows Search is just scanning the folder.

There are a lot of complicated ways to do it, from Safe Booting to disabling Windows Services to running Linux.

The truth is, the simplest way is just to reformat.

link|improve this answer
2  
Agree with the format. I doubt that Search indexer is the problem, though it could delay the delete. – Michael9000 Nov 1 '11 at 20:39
feedback

Try Unlocker.

link|improve this answer
1  
Could you explain how it works and what it is supposed to do? – slhck Nov 2 '11 at 11:53
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Tom Wijsman Nov 2 '11 at 12:52
This program won't work. This is not a matter of the folder being used by a running process. It is only a matter of ownership and permissions. Unlocker will not help. – Corporate Geek Nov 2 '11 at 14:08
Right click on file or folder you wish to unlock and then click on unlocker. You will see list of process that have locked the file or folder. – jason Nov 3 '11 at 0:29
feedback

To complete what @Michael9000 said: There is also a registry hack which adds a "take ownership" entry to the right click menu. Download the hack, run it, then right click on the folder to take ownership and then delete it. Info about the hack can be found here:

Add or Remove the Take Ownership Option to the Right Click Context Menu

link|improve this answer
feedback

FileAssassin does the job quite nicely

link|improve this answer
feedback

Put Knoppix on a USB stick and boot from that. You may be able to mount the drive and delete files.

link|improve this answer
feedback

You can delete protected Windows files using EBCD, either from internal HDD, or from USB HDD.

http://www.prime-expert.com/ebcd/

If you are deleting Windows files from external (USD) HDD, then demo version will suffice.

link|improve this answer
Why pay, too many free ones. – Moab May 5 at 15:24
feedback

Your Answer

 
or
required, but never shown