If your clients regularly leave shared files open on your 'server', it would be nice to close them all, when needed.
In tip 0678 ยป The NET FILE command, you learned how to close them one at a time.
NOTE: The NET FILES command only effects files opened from SMB (Server Message Block) clients. Files opened via HTTP, FTP, IPC or RPC are NOT affected. If a client was editing a shared file, closing it will loose the unsaved edits. The Server service must be running for NET FILE to function.
To close all open shared files, run CloseAll.bat, which contains:
@echo off for /f "Skip=4 tokens=1" %%i in ('NET FILES') do if not "%%i" EQU "The" NET FILE %%i /CLOSE :end
0 comments
Hide comments