I have written a batch file as follows:
net use k: \\servername\share
copy file.txt k:
net use k: /del
When I run this from a DOS prompt I get the following message:
There are open files and/or incomplete directory searches pending on the
connection to k:.
Is it OK to continue disconnecting and force them closed? (Y/N) [N]:
——————————————–
How do I get around this message and close the mapped drive. It has to do with the window that opens for the Kdrive. If I close the window while the file is being copied, I don’t get the prompt and the batch completes OK. Thanks