I've got a couple of batch files that seem to fail when windows loses a connection to a network drive. If I navigate to the network drive via windows explorer, the connection is restored and the batch script will subsequently complete successfully. Is there something like a "net refresh" command that I can issue prior to trying to access the network drive that will make the connection available?
Example script:
j:
cd \python\
Windows 10 Pro, but I think I've seen the same phenomenon back on 7 and 8 as well. It's already mapped, credentials are saved, just need to ping it or something...
Assuming your Server where J:\ resides responds to ICMP echo request you could try something like this: