Jump to content

Delete an "Undeletable" File


Recommended Posts

Posted

Have you ever tried to delete a file in Windows Explorer and received the error message that it could not delete the file because it was in use? This can happen even when you know for a fact that the file is not in use.

You may open a command prompt and try to delete the file with the Delete command. But this method also fails.

Here's how you can delete an "undeletable" file. Follow these steps:

1. Close all open programs.

2. Open a command prompt.

3. Right-click the taskbar, and select Task Manager.

4. On the Processes tab, select Explorer.exe, and click the End Process

button.

5. Minimize Task Manager, but don't close it.

6. At the command prompt, use the Delete command to remove the file,

and close the command prompt.

7. In Task Manager, go to File | New Task (Run).

8. In the Create New Task dialog box, enter Explorer.exe, and click OK.

9. Close Task Manager.

From Windows XP Tips Newsletter at TechRepublic.com


Posted

By doing that, you'd lose some of your system tray icons, and they will need to be restarted as well to come back.

A better method is to download Process Explorer from sysinternals.com, type out the filename (or anything nearly related to that) in the Find Handle box. Then close the handle it finds :)

Posted

Will that work for directories too? i havent tried much but running some system diagnose tools.

its about a folder with a space at the end of it,

"Command and Conquer Generäle Die Stunde Null "

i dont know whats wrong with it but no contextmenue can be opened on this directory.

i hope that hint will kill this directory....

dont work, still there!

Posted

toreach,

Certain characters are a problem, i.e. TM. You might try renaming the folder and then try to delete it. Not sure about that, but it will only take you a few seconds to see if it works.

Posted

yes the process explorer from sysinternals.com also processes the directories.

ending explorer causes icons to disappear, as well as losing some unsaved info. simple example. position your files randomly on the desktop, close and reopen explorer.... arrangments.. gone!

Posted

My icons always keep their positions after restarting explorer. Maybe that only happens when you 'kill' explorer through task manager, rather then ending it the proper way.

The proper way to end explorer...

Go to start then shut down to get the 'shut down windows' dialog box

Hold alt,ctrl, shift and then press cancel. Explorer will shut down.

And of course, alt,ctrl,del to get taskmanager so you can restart it.

All of my system tray icons dont come back though.

Posted

wow i never knew about that

here's something else

press ctrl + shift +esc to bring up task manager..

i dunno how many of u are using xp manager but when u change a setting it prompts u whether u want to restart explorer or not.

now when it restarts the explorer everything remains the same

i had some other program that did this

so there is a way to restart kernel. so there must be some more proper way of doing it..

Posted

? how is that closing the file?

if someone on the network is using the file yea u can get rid of them like this but they're talking about a file being used by explorer.exe..... :) not to be rude or anything..

Posted

I use WhoLockMe. It adds an entry to the context menu, will show every process that's using this file/folder, and has a "Kill Process" button. Oh yeah. It's free!

  • 1 month later...
Posted

How would you close a file from within the command prompt? Like if i wanted to end the process "Iexplore", how would I do that?

Posted

You can just as easily use the cmd.exe to delete the file using the del command, without terminating the process that is causing it to get locked. For the majority of time, this will work.

Posted

how would you close out of a process? Anyone? I don't need the del command, i want to close out of Iexplore.exe in a batch file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...