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.

Possible Duplicates:
How do I delete a 'locked' file?
Tool to determine what has locked a file

While trying to remove an empty directory on Windows 2000, I am told that I can't do that, because the file is possibly opened.

As mentioned in "How do I delete a 'locked' file?", I tried the Unlocker, but it didn't seem to find anything. Also, I am not able to use the Process Explorer.

So on Windows 2000 server, how do I found out the process/program which opened the folder, and how do I make it unopen it?

EDIT: With a bit of luck I found out that once I killed one of the httpd process running (for a totally unrelated reason), I was able to remove the folder. The question are now: why didn't net file pick it up? And how would I have been able to detect the right process in the first place?

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, random Aug 11 '11 at 14:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Are you able to reboot the machine? Did you? –  Ƭᴇcʜιᴇ007 Aug 11 '11 at 12:17
    
@techie: I saw the thread you linked and mentioned I tried the solution without success. Furthermore it has a windows-xp tag, and I have the problem on windows 2000. As to me being able to reboot the machine, a web application is running on the machine, so if there were a solution which didn't require me to reboot the machine it would be good. –  Eldros Aug 11 '11 at 12:23
    
@Eldros I know you said you couldn't install process explorer, but it doesn't really install anything you just run it and so long as you accept the license it just runs. There's no install routine or rebooting. –  Col Aug 11 '11 at 12:35
    
@Col, on their site, they state that the application is on Server-side for Windows 2003 or higher. Furthermore, the exe is complaining about a missing dll to be able to run. –  Eldros Aug 11 '11 at 12:39
    
@Eldros is it possible that someone has the folder open in a remote desktop or from the server console? In case you hadn't noticed I'm starting to clutch at straws now. –  Col Aug 11 '11 at 12:42

1 Answer 1

It may be the file is open from elsewhere, if you go to a command prompt and type

net file

this will list files that are open from remote workstations with id numbers to close a file the command is

net file  <ID No> /close
share|improve this answer
    
The only entry I have doesn't correspond to the folder I want to delete... But nice command, didn't knew about it. –  Eldros Aug 11 '11 at 12:17
    
out of interest, i'm on xp, and just tried opening one file from another via file sharing. did net file on each of them, and it said "There are no entries in the list" so i'm probably not doing something right, but the method doesn't seem to work there –  barlop Aug 11 '11 at 12:19
    
I'm not sure it works under non server OS's although I would have expected it to. It definitely works on all server OS's from 2000 onwards. –  Col Aug 11 '11 at 12:20
    
I just tested under XP pro and it seems to work, certainly for the excel file I tested with. It may be that certain apps don't hold the file open. –  Col Aug 11 '11 at 12:28
    
The question is indeed: Is the file locked in @barlop case. –  Eldros Aug 11 '11 at 12:30

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