Copy from network drive to local computer using batch
Hello experts,
Is there a batch file I can create which can copy all files from \\192.168.0.2\Script\sw to C:\CSV\sw
I also need the same batch file to copy from \\192.168.0.2\Script\hw to C:\CSV\hw
Is that possible?
Windows Batch
Last Comment
Siddharth S
8/22/2022 - Mon
oBdA
@echo offsetlocalfor %%a in (sw hw) do ( robocopy.exe "\\192.168.0.2\Script\%%a" "C:\CSV\%%a" /e /r:0 /w:0)
Wow, that was fast and works! Thanks but I have another thing. I have to copy from different locations onto one folder, can I incorporate it all in one.
Say I have to copy from \\192.168.0.99\Script\sw to C:\CSV\sw and \\192.168.0.99\Script\hw to C:\CSV\hw
Thanks Bill, duplicate handling wont be a problem. If two files with the same name exists, then I want them to overwrite.
Let me try this and get back to you.
Open in new window