Jump to content
Compatible Support Forums
Sign in to follow this  
TrueBavarian

How to close open files on Win2K

Recommended Posts

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.

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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.

 

 

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×