How to close open files on Win2K
I'm administering a Windows 2000 server used as Terminal Server. Some 20+ people are working on that box so the easy way to fix my problem, a reboot, is not possible during working hours. The problem is, there's a couple of files locked (open) by users locally (not over network connection) which I need to delete.
I'm administering a Windows 2000 server used as Terminal Server. Some 20+ people are working on that box so the easy way to fix my problem, a reboot, is not possible during working hours.
The problem is, there's a couple of files locked (open) by users locally (not over network connection) which I need to delete. The users are not even logged on so I'm kind of stuck here.
Any help would be highly appreciated.
T.
The problem is, there's a couple of files locked (open) by users locally (not over network connection) which I need to delete. The users are not even logged on so I'm kind of stuck here.
Any help would be highly appreciated.
T.
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
You can try using Inuse.exe; File-In-Use Replace Utility.
InUse is a command-line tool that performs on-the-fly replacement of files currently in use by the operating system. You must be a member of the Administrators group to use this tool.
InUse is primarily used to replace locked operating system files. After running the tool, the file specified is not replaced until the system is restarted. During restart, the system moves the file immediately after AUTOCHK is run, but before creating any paging files. This tool is useful for troubleshooting purposes, where you might need to replace an individual file on your computer instead of an entire set of files.
You could replace the file with a "dummy file".
Download the utility free from:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/inuse-o.asp
Or you could try this:
MyComputer (Right-click) --> Manage --> Shared Folders --> Open Files --> (find what file as you want, highlight it and right click the file) choose the 'Close Open file'.
Now you have closed the link (or locking) of those in-use files, then you are able to delete it.
InUse is a command-line tool that performs on-the-fly replacement of files currently in use by the operating system. You must be a member of the Administrators group to use this tool.
InUse is primarily used to replace locked operating system files. After running the tool, the file specified is not replaced until the system is restarted. During restart, the system moves the file immediately after AUTOCHK is run, but before creating any paging files. This tool is useful for troubleshooting purposes, where you might need to replace an individual file on your computer instead of an entire set of files.
You could replace the file with a "dummy file".
Download the utility free from:
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/inuse-o.asp
Or you could try this:
MyComputer (Right-click) --> Manage --> Shared Folders --> Open Files --> (find what file as you want, highlight it and right click the file) choose the 'Close Open file'.
Now you have closed the link (or locking) of those in-use files, then you are able to delete it.
As English is not my mother language I think there's a misunderstanding here: the files in question are marked as open by a user that was logged on via terminal client to the server but is not anymore. It seems to be much more difficult to close a file that is _not_ open via a network connection.
Thanks anyway for the quick response
Thanks anyway for the quick response
To close all open files on a server you can run this little batch file, I use it all the time. Copy the text below into a text editor and save it as a BAT file. ex( CloseAll.bat ) The file can be run from the command line or called by a scheduler. Good luck.
for /f "skip=4 tokens=1" %%a in ('net files') do net files %%a /close
F.
for /f "skip=4 tokens=1" %%a in ('net files') do net files %%a /close
F.