![]() However, if you read down the link where i found the second script people start talking about how "the script is closing them, but as they are still open on the destination client the session reopens as the resource is still being used." I can confirm this as I ran the script and checked through Computer Management -> Shared Folders -> Open Files and saw the files were closed, then upon a refresh in the Open Files window, the files would reopen automatically.Īm I correct in thinking that this is because the files are still open on the client side they auto-connect after the cmds/scripts are done running? ![]() This script: from here for /f "skip=4 tokens=1" %a in ('net files ^| findstr C:\Apps\') do net files %a /closeįrom here $results = net file | Select-String -SimpleMatch "D:\Sap_Labels\" I have done some googling and found the following fixes: I am looking for a way to run a batch script to close all open files from our file server. Hello r/sysadmin - i am hoping you can help me.
0 Comments
Leave a Reply. |