General discussion
May 28, 2003 at 04:53 AM
gcheels

Batch Files

by gcheels . Updated 23 years, 4 months ago

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

This discussion is locked

All Comments