tags:

views:

1238

answers:

2

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?

+5  A: 

Can you just use the full UNC path to the file?

copy \\myserver\myshare\myfolder\myfile.txt c:\myfiles
Mark Biek
A: 

You can specify the drive letter for net use. Put this in the command prompt for more info:

net use /?
Joel Coehoorn