How can I copy network files using Robocopy?
How can I copy network files using Robocopy? [closed]
Asked Answered
I use the following format and works well.
robocopy \\SourceServer\Path \\TargetServer\Path filename.txt
to copy everything you can replace filename.txt
with *.*
and there are plenty of other switches to copy subfolders etc... see here: http://ss64.com/nt/robocopy.html
Will robocopy route the traffic via the machine it is executed on (Source --> RoboCopy Machine --> Target) or will it direct the files directly from source to target (Source --> Target) and thus not cause (except for messaging overhead) network load on the machine it runs on? –
Viscose
@Viscose good question, as it runs out of the box with no need to install anything on target or source machines I am pretty sure it runs only from the machine you start it in command prompt, which means that if you run it from machine C to copy files from A to B files will kind of go A to C to B, in my understanding, because the bytes are moved by robocopy which will open streams / sockets or whatever buffers in the machine where it runs from. –
Immune
You should be able to use Windows "UNC" paths with robocopy. For example:
robocopy \\myServer\myFolder\myFile.txt \\myOtherServer\myOtherFolder
Robocopy has the ability to recover from certain types of network hiccups automatically.
this is actually the wrong format, file name should NOT be included in the source path. –
Immune
Edited to show correct format in example. –
Unimproved
Check the following answer for correct command. File name should be at the end –
Gustave
© 2022 - 2024 — McMap. All rights reserved.