Windows XP - File won't delete

I have a file on my computer that I’m trying to delete, but I’m having some trouble. I keep getting the error that says I can’t delete that file because some other program or process is using the file. The weird thing is that there are no other programs open… I deleted several other files with the same extension at the same time and none of them gave me this problem, just the one rogue file…

I pressed Ctrl + Alt + Del to open task manager and confirm nothing else was running in the background, but even after stopping all the processes I could, I still got that message when trying to delete.

Any ideas on other things I could try?

(and yes, I tried re-booting)

I know what to do, since the same thing happened to my computer.

  1. Open a command prompt (run… ‘cmd’)
  2. Use old DOS commands to go to the directory where the files you want to delete are. (cd directory or to back cd…)
  3. Open the task manager (ctrl+alt+delete)
  4. End task explorer.exe (this will shut down ALL of XP, while leaving the computer running. Task bars and all icons on the desktop will vanish. don’t worry.)
  5. Switch to the dos window, either with alt+tab or using the mouse.
  6. Manually delete the files (del filename.ext)
  7. Switch window to task manager
  8. Go to archive, the ‘run’ then write in ‘explorer.exe’
  9. Done.

Enjoy.

I’ve had this happen to me with files and even directories. I just hope it’s not one of those where Windows decides to put it all BACK after you delete it the first time.

Not if you do it that way I described.

Uh, I have a stupid question. I feel all the more stupid 'cos I just about consider myself an expert on most things computer. How do I switch directories in the DOS prompt when there’s a space in the filename? NTFS volume. The three traditional approaches all fail for me (file not found):

  1. use the 8.3 name (NTFS doesn’t show [or have?] 8.3)
  2. quotes around the name. For example, cd “Hello there” results in Parameter format not correct - "Hello.
  3. Escape the spaces, but DOS doesn’t like escapes because of its use of backslashes.
    Don’t use anything and just type it in. According to “help cd” both “cd” and “chdir” should work with quotes or even without. This is my Win2K Pro machine at work. I’ve had similar difficulty with my XP Pro box at home.

dont do any of that, close all windows right now except your IE browser window,

goto FILE->Open->Browse

select “display all file types”

find your file

highlight it, hold shift then hit delete.

poof, gone. The thing is the porn,err i mean file you’re trying to erase is most likely trying to be opened by XP’s little “file preview” window, or something retarded like that. Just do what i said, it applies to almost any other program, use their little “built in” explorer to delete files that you’re having trouble with.

I just tried it on my XP Pro (FAT32), and it works fine if you just use the space bar to add the spaces.

e.g.

C:>cd documents and settings

C:\Documents and Settings>

I’m not sure if NTFS handles it differently. Update us if you figure it out, I’d like to know.

TexGuy, if The Gaspode’s method doesn’t work for you (excellent workaround, I’ll keep it in mind the next time), you could try booting into DOS using dos boot disks and deleting the file.

Or, restart in safe mode (hold down F8 while XP is loading and you’ll get a prompt) and delete it the normal way. Safe mode doesn’t load any processes so that annoying thing in the background that’s using your file won’t complain.

BTW, XP Dos has this cool feature where you can partially type in a file or folder name then TAB through all the valid combinations (based on what you’ve already typed) which sorts out all the baffling extended filename stuff for you.

Well, before you jump to the wonderful advice presented here, I would ask you to make sure that the file is something that you should be deleting, since Windows is going through so much trouble to keep you from deleting it.

Generally, I tend to tell people to leave files alone unless they know exactly what the file is and what it’s doing, and even then non-advanced users should usually leave it alone unless it’s a document (IOW, non-executable file that is loaded into some other program for viewing and/or editiing, so porn fits into this catagory) or an executable that you downloaded off of somewhere.

-lv

What is the name of that file?

Reboot in Safe Mode, then delete the file.

To boot into Safe Mode, follow these steps:[list=#]
[li]Restart your computer and start pressing the F8 key on your keyboard. [/li]
[li]When the Windows Advanced Options menu appears, select SAFE MODE, and then press ENTER.[/li][/list]

I’ve run into a few files like that. I just reboot and before opening any programs, delete the file. No safe mode, just a normal reboot.

Copied from Unix. That capability has been around forever on UNIX systems, and since NT4.0 (that I know of) from Microsoft.

I don’t mean to hijack this thread, but a while ago, I had Explorer crash, but without crashing all of Windows (XP Pro). Now, when I would try to run Explorer again to get all those handy features back… well, instead of reloading the taskbar and all that jazz, it would start the Windows Explorer file-viewing thingy. So, is there some handy parameter or something I don’t know about?

(In case anybody was wondering, logging off and back on fixes the problem. It’s just that shutting down Winamp and starting it again once I log back on is such a chore. :wink: )

Thanks to all for the replies. The DOS business seemed a little out of my league, but safe mode worked like a champ.

Well, for the geeks, there is a program NTSFDOS, that boots from a floppy that lets you read your NTSF HD & do what you want with it’s files.

Are the files video files? (specifically avi files)?

See, this is why I was complaining about this particular “feature” of Windows in that Pit thread

TexGuy I get that occassionally too from Powerpoint presentations…I don’t know why sometimes they refuse to delete.

Anyway when it happpens I just put it into a new folder with nothing else in it and delete the folder…easy and fast

In the FWIW department, file sharing programs can tie files up, even if no one’s downloading it from you. Not, of course, that any of us would advocate such a program. :slight_smile: