Copying from network share using BAT
-
09-06-2019 - |
Question
What's the best way to copy a file from a network share to the local file system using a Windows batch file? Normally, I would use "net use *" but using this approach how can I get the drive letter?
Solution
Can you just use the full UNC path to the file?
copy \\myserver\myshare\myfolder\myfile.txt c:\myfiles
OTHER TIPS
You can specify the drive letter for net use
. Put this in the command prompt for more info:
net use /?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow