How do I delete a file in safe mode using the dos prompt?

BroadbandGamer

Senior member
Sep 13, 2003
976
0
0
I've got a file on my desktop that I can not delete. I've tried deleting it every way I can think of but it keeps saying it can't be deleted because it's in use. Even in safe mode I can't delete it. Can anyone help me out? The file is WorldPokerChampionship-dem.exe. I downloaded it to try out the game and now I can't delete this thing. :|
 

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
What version of windows are you using? 'del' is the command in xp.

Are you using fat or ntfs? Filemon from sysinternals might be a free app that could tell you which app you are using. I'd run the task manager and kill all unusual tasks then try again.



 

BroadbandGamer

Senior member
Sep 13, 2003
976
0
0
I'm using windows xp and ntfs.

This is the first time I haven't been able to delete a file even in safe mode.

Which program in task manager do I need to leave running?
 

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
Originally posted by: BroadbandGamer
I'm using windows xp and ntfs.

This is the first time I haven't been able to delete a file even in safe mode.

Since it's NTFS I guess you can't use knoppix to delete it. :p Anyway, sounds like you need to use a utility like filemon to see what process is using that file, then kill it and delete the file.
 

BroadbandGamer

Senior member
Sep 13, 2003
976
0
0
I finally managed to delete that little POS. I used that filemon program and it was using explore.exe. I couldn't shut down explore.exe using task manager without screwing everything up. What I did was rebooted into safe mode with the dos prompt. I then used the command del desktop\worldpokerchampionship-dm.exe and it worked!

Man that was strange.

BTW, thanks for the help infohawk!
 

Infohawk

Lifer
Jan 12, 2002
17,844
1
0
If you are in safe mode, you should run filemon and do file > capture events. Hopefully, you should see something attempting to use that file. Maybe try deleting the file while filemon is running. I would also try using the task manager and looking for unusual processes if filemon doesn't spot it being used. Odds are it would be some odd process using that file...