How can I copy network files using Robocopy? [closed]
Asked Answered
R

2

22

How can I copy network files using Robocopy?

Resign answered 23/6, 2009 at 5:19 Comment(0)
I
38

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

Immune answered 18/11, 2012 at 15:0 Comment(2)
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
N
1

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.

Nalda answered 23/6, 2009 at 5:24 Comment(3)
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 endGustave

© 2022 - 2024 — McMap. All rights reserved.