8 replies
by xpertdragon
Are you interested in a utility that just closes open files, or do you need to perform this task for a Backup reason? If so, you might have an option that allows you to close such files on or off the server before a backup is performed.
Please provide more info.
Paul
by ears54
by ears54
Thanks for the reponse Paul.
I need utility to just close the files, but I need something that will allow me to select multiple files. Windows native utilities will only allow closing a single file at a time.
Greg
by lordinfidel
You want to use PSTools, more explitedly PSFile located inside the tools suite.
http://www.sysinternals.com/ntw2k/freeware/pstools.shtml
FYI- These are command line utilities. BUt they work great.
by ears54
by joseph moore
Well, you can run a FOR command from a Command Prompt to parse out the NET FILE command. Here is what you would do:
Open a Command Prompt on the Win2K Server that has the open files you want to close.
Type in the following:
for /f "tokens=1,2 skip=4 delims= " %i in ('net file') do net file %i /CLOSE
That will run through the whole list of open files, take out the ID number that each open file has, and then Close that file connection.
You could also save this in a BAT file and scheduleit to run whenever you want.
NOTE: remember, a FOR command in a BAT file requires that the %variables used be double %% signs. So, that line in a BAT file would read:
for /f "tokens=1,2 skip=4 delims= " %%i in ('net file') do net file %%i /CLOSE
hope this helps
by ears54
by ears54
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending