Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

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

5 Answers 5

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

share|improve this answer

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.

share|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

What i did was go t windows explorer whihc is the library thingy on the left you will see files, click on one, then right click and you will see it is read only, so unclick it. Worked for me but i only had one program that was read only.

share|improve this answer

FileAssassin does the job quite nicely. It unlocks file handles and (optionally) deleted the file. It can also trigger the "delete on restart" job which is a function of Windows itself.

  1. Download the software and open it. You will see this: FileAssassin main window

  2. Select a file by either dragging the file itself (from the explorer!) into the text area of FileAssassin or using the attached select button.

  3. Now you can select what FileAssassin should do.

    • The "FileAssassin method": This first option allows you to do several things at once, namely:
      • Unlock locked file handles (this will try to remove all the Windows handles that block the file from being deleted)
      • Unload modules (I am not a 100 % on this, but if it's a library (DLL), it will try to unload it wherever it is loaded)
      • Terminate the file's process (This will terminate any process which bears this file's name. Helpful if it's an exe, although you could have done this yourself using the task manager!)
      • Delete file (straightforward)
    • Delete on reboot: Uses the Windows built in delete on reboot functionality
    • Use normal delete function: Pretty pointless most of the time since that's exactly what you are already doing.

If you are sure you are not deleting a file which is critical for the system, select the first option and all the checkboxes below that. The second and third checkboxes only trigger for modules and executables, so it doesn't matter if they are selected or not.

share|improve this answer
    
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. –  Ivo Flipse Jul 14 '12 at 12:38
    
@IvoFlipse Got it, expanded it to explain what FileAssassin does (the text is original, no copypasta). –  sinni800 Jul 15 '12 at 11:54

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.