04-05-2004, 01:50 PM | #1 (permalink) |
Location: Waterloo, Ontario
|
WindowsXP won't let me delete a file!
Now, I'm trying to delete a file and I can't because something has a lock on it but, of course, WindowsXP&trade won't tell me what that something is. So, I am using Process Explorer, by Mark Rusinovich, to detemine what process has a lock on the file and it turns out to be (drum roll, please...)--explorer, itself! Yes, the very program used to delete files has a lock on the file I want to delete!
What crap is this? For all of you not In the Know©, explorer is the name of the process that is your windowing environment. So, when you place things on your desktop, or use your taskbar, or launch the default file browser (also commonly called Explorer), that is all done with a single process called explorer, probably found in your C:\WINDOWS directory. The program is formally called Windows Explorer. I have terminated explorer and started it again (to ensure that no one has a lock on said file). Indeed, no one has a lock on the file. So, I go to delete it using explorer and it takes it's sweet time before telling me that it can't because it has a lock on the file! Just in case that wasn't annoying enough, it also decides to spin on the CPU, for no good reason (other than to annoy me, of course!). The only remedy to all this was to kill explorer (again!), delete the file using the del program from the command shell, and then to restart explorer. Now, things are finally okay with my system (for now...). My question is, What the Fuck!?© If WindowsXP&trade isn't the buggiest piece of crap I have ever used since Windows95/98&trade, I don't know what is! |
04-05-2004, 02:00 PM | #3 (permalink) | |
strangelove
Location: ...more here than there...
|
Re: WindowsXP won't let me delete a file!
Quote:
//edit - you did the right thing by killing explorer and deling from cmd...and I hope/assume you did *not* restart several times..I suspect you know better
__________________
- + - ° GiRLie GeeK ° - + - ° 01110010011011110110111101110100001000000110110101100101 Therell be days/When Ill stray/I may appear to be/Constantly out of reach/I give in to sin/Because I like to practise what I preach
|
|
04-05-2004, 02:05 PM | #4 (permalink) | |
Location: Waterloo, Ontario
|
Quote:
|
|
04-05-2004, 03:18 PM | #6 (permalink) | |
I'm a family man - I run a family business.
Location: Wilson, NC
|
Quote:
with all due respect, programs don't always tell the truth.... I read the story and have had a similar problem. Don't be so quick to be a smartass. I simply ended all the programs but the essentials and I could then delete the file. not to mention restarting your computer is something you should try. sometimes an application that is exexcuted on startup can hold a file hostage. sometimes it won't. it's always worth a try. everything is worth a try.
__________________
Off the record, on the q.t., and very hush-hush. |
|
04-05-2004, 03:48 PM | #9 (permalink) | ||
Location: Waterloo, Ontario
|
Quote:
So, let me ask a simple question. If you had read my story then why did you suggest that I shut down all but essential programs as if I hadn't already solved my problem? Quote:
|
||
04-05-2004, 03:56 PM | #10 (permalink) |
Location: Waterloo, Ontario
|
Thank you all for your kind advice. Please, let me clear a few things up.
I have already solved my problem. If you read my post, you will see that it was merely a (hopefully) funny anecdote on how crappy WindowsXP&trade can be. I was eventually able to delete the file and without rebooting! I admit that my characterization of my solution as being "the only remedy" was poor considering how rebooting would probably have fixed the problem but, like most users, I hate having to reboot my machine. It's inconvenient and (in my humble opinion) an insult to computing. I mean, really. The very program used to delete files held a lock on the file, preventing it from being deleted! Does no one see the irony in that? |
04-05-2004, 04:00 PM | #11 (permalink) | |
Location: Waterloo, Ontario
|
Re: Re: WindowsXP won't let me delete a file!
Quote:
|
|
04-05-2004, 04:14 PM | #12 (permalink) |
Not so great lurker
Location: NY
|
Reading through your tirade seems like you came across a (different) workaround for the issue that was in this thread about xp "holding" onto files http://www.tfproject.org/tfp/showthr...threadid=44457
Although some of the other "fixes" mentioned in the thread may help you in the future. |
04-05-2004, 04:40 PM | #13 (permalink) |
Upright
|
*edited because I can't give advice without being rude*
Try checking the security settings on the file before blaming explorer for having a lock on it. More than likely you didn't have rights to be accessing that file and that is why you were unable to do so. Last edited by onodrim; 04-05-2004 at 05:57 PM.. |
04-05-2004, 04:44 PM | #14 (permalink) | |
I'm a family man - I run a family business.
Location: Wilson, NC
|
Quote:
I'm glad you were able to fix the problem. But just because restarting didn't fix it this time around doesn't mean restarting your computer in the future is a waste and should be a last resort. It's usually the first thing I try, and it usually fixes the problem
__________________
Off the record, on the q.t., and very hush-hush. |
|
04-05-2004, 05:43 PM | #16 (permalink) |
Upright
|
It is amazing how many people treat running Windows as if it were practicing VooDoo. It's really not that hard to see what happens and why. And my hat goes off to RedJake, its not that hard to hit Start, Shutdown, Restart; and it definately is worth a try 90% of the time.
|
04-05-2004, 06:01 PM | #17 (permalink) | |
I'm a family man - I run a family business.
Location: Wilson, NC
|
Quote:
__________________
Off the record, on the q.t., and very hush-hush. |
|
04-05-2004, 06:17 PM | #18 (permalink) |
Psycho
Location: Canada
|
I personally hate restarting. It bugs the hell out of me. You shouldn't need to restart your computer to fix a problem that shouldn't exist in the first place. I agree with KnifeMissle on this one. Restarting should be tried when you've gone through all the other steps to fix the problem. This kind of attitude that restarting is an acceptable practice just gives people an excuse to continue writing shoddy code.
Granted I use linux and only restart my computer when the power to my UPS dies .
__________________
You did what with a duck? |
04-05-2004, 07:08 PM | #19 (permalink) | |
Location: Waterloo, Ontario
|
Quote:
If I understand you correctly, explorer obviously doesn't implement access privileges by locking files. In fact, access privileges aren't even the responsibility of explorer, it's controlled by the file system which is completely independent. Also, if I didn't have access rights then how did the del program delete the file? Do you run Windows with administrator privileges? I'd be very surprised if you didn't. However, that's my assumption so let me now say that access privileges wouldn't have prevented me from deleting the file. Finally, one might imagine that explorer would simply tell me that I didn't have access to it rather than saying that another program had it locked. Of course, this would require you to trust me to recognize a file lock when I see one but I like to think you assume people know what they're talking about unless they say otherwise. I mean, I did show some technical proficiency in my post, did I not? Considering all this, I find your conjecture less than likely... |
|
04-05-2004, 07:57 PM | #20 (permalink) | |
Location: Waterloo, Ontario
|
Quote:
Now, you have mentioned incredulity over my attitudes against rebooting so let me try to explain to you why I dislike it so much. You mentioned that you would have understood my position if I had to reinstall Windows, right? Why is that? I will take a guess and say it's because reinstalling is a colossal pain in the ass, right? Well, rebooting is a pain in the ass as well. Of course, it's not nearly as bad as reinstalling but it's bad enough for me to look for alternatives. You see, if I were doing nothing, or only had winamp running, then I would have simply rebooted. Why not? I could simply restart winamp and it would probably have remembered my playlist. However, I have a little more than just winamp running. In fact, I have more than twenty applications running, about half of which I use for professional development (my job). Launching all those apps again would be annoying enough but there's more. Two of these applications are my RCS clients, which are in a peculiar state while I'm trying to perform a branch merge. I would hate to have to do this, again. Another is FireFox, which has about fifty tabs open (my estimate, after counting ten) and the save tab layout feature has never worked for me (it's version 0.8). Several of these applications are also Internet Explorer, on websites I'd hate to have to go find again (because FireFox has trouble displaying more than fifty tabs without the tab extensions installed on a 1600 pixel wide display). My MSDN browser is on a particularly interesting page that I'd hate to go find again (see a pattern here?). Not to mention that the undo and history stacks on several of my applications will be lost if I had to restart them. I haven't even mentioned the aesthetic displeasure of having to reboot a crappy operating system. I am very pleased to see that, not only does Homey_V agree with me, but he even mentioned some important points and said them well. If I may quote him, "you shouldn't need to restart your computer to fix a problem that shouldn't exist in the first place." He also mentions how this attitude just adds to the complacency of developers and the general quality of software. Let me diverge a bit and mention a story my sister told me. She signed up with AOL because they gave her several months of service, free, while she had every intention of cancelling before the trial period (she is unnecessarily cheap). She was using their latest software (6.0?) and she was confused by how unstable it was. She said it perpetually crashed and she didn't understand how it could be perfectly acceptable to a consumer to have to continually restart their software. Was this normal? Is all software like this? Is this just part of computing? That's what you're saying when you say "ah, simply reboot." You're saying that it is perfectly normal to have your software incessantly fuck up on you. You're saying that this is okay and we should only expect more in the future. Excuse me if I have higher standards than that... |
|
04-05-2004, 10:06 PM | #21 (permalink) |
Location: Waterloo, Ontario
|
In retrospect, I don't think rebooting would have helped my problem. The issue is that the very program used to delete files was holding a lock on the file. I even restarted this program (explorer), so we know the bug is quite reproducible. Windows Explorer is obviously to blame. It's a good thing I didn't bother rebooting 'cause I would have done so for nothing!
Of course, it helps that I actually read the Interests > Tilted Computers > XP "holds" onto files thread. Thanks, heyal256! There is a possible fix but I'm wary about applying fixes I don't understand. Still, I almost understand it so I will investigate it when I get back to work, tomorrow... |
04-06-2004, 03:20 AM | #22 (permalink) |
Knight of the Old Republic
Location: Winston-Salem, NC
|
Ha ha, whenever I have this problem, I just restart and it fixes it immediately. It is a bit odd that ending the processes doesn't fix it. I just restart and it lets me delete it right after.
-Lasereth
__________________
"A Darwinian attacks his theory, seeking to find flaws. An ID believer defends his theory, seeking to conceal flaws." -Roger Ebert |
Tags |
delete, file, windowsxp |
|
|