We have a script that runs nightly on our Win2K SP4 server. (I know, we need to upgrade the server OS. We plan to do that soon.)
Sometimes the script has failed when people had left shared folders open from their desktops.
So we have used the
net files and
net file NNNN /close batch commands to find and close them. This has worked for us.
However as of last week, some folders were left open from a Windows 7 desktop. The script "closed" them as usual, and the log shows
The command completed successfully. for each one. But the folders were apparently still open: the script's later operations on those folders failed.
This is confirmed when I log in to the Win2K server and manually close the open folders using Computer Management > Shared Folders > Open Files / Right-click > Close. When I do that, the open folders disappear from the list at first, but then when I refresh the list, those folders are back on it.
Notably, this happens with folders open in Explorer on Windows 7, but not with folders open on Windows XP, for example. If a shared folder is open in Windows Explorer on XP, and I close that folder from the server side, it stays closed. This problem also does not happen with files open in certain other apps; e.g. if I have a file open in Notepad++, and I close it on the server, it stays closed.
On the server side, I have tested this phenomenon in Win2003 Server and Win2008 Server Standard SP2. The result is the same: when you close an open shared folder from the server side, it reappears immediately (or never disappears, in the case of Win2008). But only if it's open from Windows 7; not from e.g. Win2003 Server.
So I wonder if there's been some Windows 7 update recently that causes Explorer to immediately re-open folders that have been closed by the server?
If so, what could I do about it from the server side, to keep those folders closed until our script is done running?
Thanks for any help or suggestions.