Mapping a network drive without hardcoding a drive letter in a batch file
If you don’t have multiple network shares connected simultaniously, you can make net use * assign a free drive letter for you. Afterwards you can use robocopy to access the share via its UNC path and release any connected share with net use * /delete. Something like this: @echo off net use * \\192.168.0.1\Share\wwwroot\MyProject /user:mydomain\myuser … Read more