Page 1 of 1

Robocopy syntax

Posted: 07 Jul 2021 16:58
by falcios
This is a sample batch file.

This script copies a file from the source with one name and in the destination it is a different name.

copy "c:\users\test\sample.txt" "d:\test\sample july 2021.txt"

Can Robocopy do this, copy file from source with one name and the destination with a different name?
If so, what is the syntax to do this?

Thanks in advance.

Re: Robocopy syntax

Posted: 07 Jul 2021 19:02
by Squashman
Nope. The Syntax is pretty clear from the help file.

Code: Select all

              Usage :: ROBOCOPY source destination [file [file]...] [options]
             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               file :: File(s) to copy  (names/wildcards: default is "*.*").