• Home
  • How to
    • Cisco
    • Citrix
    • Database
      • MySQL
    • Exchange Server – How to
      • Exchange 2007
      • Exchange 2010
      • Exchange 2013
    • Linux – How to
      • Debian – Ubuntu
      • RHEL
      • CentOS
      • Java
      • Apache/Apache2
      • Jenkins
      • LVM
      • Networking
      • Postfix – VDA
      • Tomcat
      • Samba
    • Monitoraggio
      • Munin
      • Monit
      • Nagios
    • Windows – How to
      • Windows 7
      • Windows 8/8.1
      • Windows 10
    • VMware – How to
      • Horizon View 5.2
      • Horizon View 5.3
      • Horizon 6
    • Office
      • Outlook 2007
      • Outlook 2010
  • News
    • Microsoft
    • Multimedia
    • NAS
    • VMware Infrastructure – news
  • About Me
  • What’s my IP
Smereghetti.com
Howtos & Tutorials
  • Home
  • How to
    • Cisco
    • Citrix
    • Database
      • MySQL
    • Exchange Server – How to
      • Exchange 2007
      • Exchange 2010
      • Exchange 2013
    • Linux – How to
      • Debian – Ubuntu
      • RHEL
      • CentOS
      • Java
      • Apache/Apache2
      • Jenkins
      • LVM
      • Networking
      • Postfix – VDA
      • Tomcat
      • Samba
    • Monitoraggio
      • Munin
      • Monit
      • Nagios
    • Windows – How to
      • Windows 7
      • Windows 8/8.1
      • Windows 10
    • VMware – How to
      • Horizon View 5.2
      • Horizon View 5.3
      • Horizon 6
    • Office
      • Outlook 2007
      • Outlook 2010
  • News
    • Microsoft
    • Multimedia
    • NAS
    • VMware Infrastructure – news
  • About Me
  • What’s my IP
Home  /  HOW-TO • Windows • Microsoft  /  How-to – Use RoboCopy

How-to – Use RoboCopy

Written by Stefano Mereghetti
Stefano Mereghetti
21 febbraio 2010 HOW-TO, Windows, Microsoft RoboCopy

What is Robocopy?

Robocopy is a command that is used at the command line to make copies of files and folders. It is also known as Robust File Copy. It comes with windows vista, but was also part of the windows resource kit. It was made to be used for mirroring directories. Robocopy has the same abilities as more familiar commands such as copy and xcopy, the biggest difference is that its not a file copier, it was made to copy folders and keep them in the same form as they were.

Examples of some of the syntax that would be used in Robocopy:

Here is the basic line that you would use in a variable format if you were to run Robocopy:

Robocopy source destination [File [file] … ] [options]

Variable Meaning Comments
source Source directory You can use drive:\path or\\server\share\path
destination Destination directory You can use drive:\path or\\server\share\path
file Names of files to act upon You can use wildcard characters (? and *). If no files are listed, Robocopy defaults to all files (*.*).
options Command-line options you wish to use Available options are described later in this document.

Commands:

Shell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<span style="color: #000000;">Copy options :
 
                 /S :: copy Subdirectories, but not empty ones.
                 /E :: copy subdirectories, including Empty ones.
             /LEV:n :: only copy the top n LEVels of the source directory tree.
 
                 /Z :: copy files in restartable mode.
                 /B :: copy files in Backup mode.
                /ZB :: use restartable mode; if access denied use Backup mode.
            /EFSRAW :: copy all encrypted files in EFS RAW mode.
 
  /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
                       (copyflags : D=Data, A=Attributes, T=Timestamps).
                       (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
 
           /DCOPY:T :: COPY Directory Timestamps.
 
               /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
           /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
            /NOCOPY :: COPY NO file info (useful with /PURGE).
 
            /SECFIX :: FIX file SECurity on all files, even skipped files.
            /TIMFIX :: FIX file TIMes on all files, even skipped files.
 
             /PURGE :: delete dest files/dirs that no longer exist in source.
               /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
 
               /MOV :: MOVe files (delete from source after copying).
              /MOVE :: MOVE files AND dirs (delete from source after copying).
 
     /A+:[RASHCNET] :: add the given Attributes to copied files.
     /A-:[RASHCNET] :: remove the given Attributes from copied files.
 
            /CREATE :: CREATE directory tree and zero-length files only.
               /FAT :: create destination files using 8.3 FAT file names only.
               /256 :: turn off very long path (&gt; 256 characters) support.
 
             /MON:n :: MONitor source; run again when more than n changes seen.
             /MOT:m :: MOnitor source; run again in m minutes Time, if changed.
 
      /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
                /PF :: check run hours on a Per File (not per pass) basis.
 
             /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.
 
                 /SL:: copy symbolic links versus the target.
 
File Selection Options :
 
                 /A :: copy only files with the Archive attribute set.
                 /M :: copy only files with the Archive attribute and reset it.
    /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
    /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.
 
/XF file [file]... :: eXclude Files matching given names/paths/wildcards.
/XD dirs [dirs]... :: eXclude Directories matching given names/paths.
 
                /XC :: eXclude Changed files.
                /XN :: eXclude Newer files.
                /XO :: eXclude Older files.
                /XX :: eXclude eXtra files and directories.
                /XL :: eXclude Lonely files and directories.
                /IS :: Include Same files.
                /IT :: Include Tweaked files.
 
             /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
             /MIN:n :: MINimum file size - exclude files smaller than n bytes.
 
          /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
          /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
          /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
          /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
                       (If n &lt; 1900 then n = n days, else n = YYYYMMDD date).
 
                /XJ :: eXclude Junction points. (normally included by default).
 
               /FFT :: assume FAT File Times (2-second granularity).
               /DST :: compensate for one-hour DST time differences.
 
               /XJD :: eXclude Junction points for Directories.
               /XJF :: eXclude Junction points for Files.
 
Retry Options :
 
               /R:n :: number of Retries on failed copies: default 1 million.
               /W:n :: Wait time between retries: default is 30 seconds.
 
               /REG :: Save /R:n and /W:n in the Registry as default settings.
 
               /TBD :: wait for sharenames To Be Defined (retry error 67).
 
Logging Options :
 
                 /L :: List only - don't copy, timestamp or delete any files.
                 /X :: report all eXtra files, not just those selected.
                 /V :: produce Verbose output, showing skipped files.
                /TS :: include source file Time Stamps in the output.
                /FP :: include Full Pathname of files in the output.
             /BYTES :: Print sizes as bytes.
 
</span>                /NS :: No Size - don't log file sizes.
<span style="color: #000000;">                /NC :: No Class - don't log file classes.
               /NFL :: No File List - don't log file names.
               /NDL :: No Directory List - don't log directory names.
 
                /NP :: No Progress - don't display % copied.
               /ETA :: show Estimated Time of Arrival of copied files.
 
          /LOG:file :: output status to LOG file (overwrite existing log).
         /LOG+:file :: output status to LOG file (append to existing log).
 
       /UNILOG:file :: output status to LOG file as UNICODE (overwrite existing log).
      /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log).
 
               /TEE :: output to console window, as well as the log file.
 
               /NJH :: No Job Header.
               /NJS :: No Job Summary.
 
           /UNICODE :: output status as UNICODE.
 
 
Job Options :
 
       /JOB:jobname :: take parameters from the named JOB file.
      /SAVE:jobname :: SAVE parameters to the named job file
              /QUIT :: QUIT after processing command line (to view parameters).
              /NOSD :: NO Source Directory is specified.
              /NODD :: NO Destination Directory is specified.
                /IF :: Include the following Files.</span>

 

Related posts:

  1. EasyRoboCopy
  2. How-to – Come nascondere i Drives ‘vuoti’ da Risorse del Computer
  3. How-to – Conversione di un volume FAT in NTFS
  4. How-to – Upgrade Windows 7 Professional to Enterprise
Share On
Stefano Mereghetti
Stefano Mereghetti

Founder of Smereghetti.com. Sys Admin and IT Manager.

mysql-logo
 Previous Article mysqldump: Got packet bigger than ‘max_allowed_packet’ bytes
microsoft-outlook-2007-logo
Next Article   Outlook 2007 – Modifica della ricerca immediata

Stato della connessione

You are not logged in.
Dimenticato?  Registrati

RSS "Debian Security"

  • DSA-3430 libxml2 23 dicembre 2015
  • DSA-3429 foomatic-filters 21 dicembre 2015
  • DSA-3428 tomcat8 18 dicembre 2015
  • DSA-3427 blueman 18 dicembre 2015
  • DSA-3426 linux 17 dicembre 2015

RSS "Punto Informatico"

  • iMessage: nessuna interferenza per gli ex utenti 24 dicembre 2015
  • Cassandra Crossing/ Pinne d'argento e getti ardenti 24 dicembre 2015
  • Backdoor Juniper, NSA morde la coda 24 dicembre 2015
  • Backdoor Juniper, NSA si e' mangiata la coda 24 dicembre 2015
  • WebTheatre/ L'importanza di chiamarsi Franco 24 dicembre 2015

Random Posts

  • synology-logo
    DSM – Version : 5.0-4528 Update 1 29 ottobre 2014
  • synology-logo
    DSM – Version: 5.1-5021 19 dicembre 2014
  • Windows-10-logo
    Windows 10 – Cumulative update KB3081444 19 agosto 2015
  • postfix-logo
    Postfix – script per la cancellazione mail dalla coda al raggiungimento di una soglia totale per un singolo mittente 20 maggio 2013
  • synology-logo
    DSM – Version: 5.2-5565 12 maggio 2015
  • ASCII table 11 dicembre 2012
  • Popular Posts
  • Recent Posts
  • portableapps-logo
    PortableApps – Plugins issue 22 dicembre 2015
  • linux-logo-pinguin
    How-to – NFS – RPC Error: Program not registered 10 luglio 2009
  • mysql-logo
    mysqldump: Got packet bigger than ‘max_allowed_packet’ bytes 12 agosto 2009
  • windows-logo
    How-to – Use RoboCopy 21 febbraio 2010
  • portableapps-logo
    PortableApps – Plugins issue 22 dicembre 2015
  • windows-logo
    How can I find all symlinks in Windows 22 dicembre 2015
  • windows-logo
    How to – solve mfc140u.dll is missing Error in mfc VC++ 22 dicembre 2015
  • aws-logo
    AWS – Lambda cron schedule examples 18 dicembre 2015

Pagine

  • About Me
  • Profilo
  • Registrazione
  • Rss
  • Term of Services

Category Posts

  • portableapps-logo
    PortableApps – Plugins issue 22 dicembre 2015
  • windows-logo
    How can I find all symlinks in Windows 22 dicembre 2015
  • windows-logo
    How to – solve mfc140u.dll is missing Error in mfc VC++ 22 dicembre 2015
  • aws-logo
    AWS – Lambda cron schedule examples 18 dicembre 2015

Tag

Android Apache Apache2 Apple AWS Centos Citrix Database Data Protector Debian DSM ESXi Exchange Server 2010 Horizon 6 Horizon View 5.2 Horizon View 5.3 HOW-TO IOS iSCSI Java KitKat LDAP Linux LVM Minix MySQL Nagios NEO X7 network Networking NFS openvas OpenVPN Outlook 2010 Postfix SCCM SSH Synology vCenter VMWare vSphere 6.0 Windows Windows 7 Windows 10 YUM

Popular Posts

  • vmware-logo
    VMware – How to power-off a virtual machine on a ESXi host 2 dicembre 2015 HOW-TO, VMWare
  • aws-logo
    Scheduling EBS Snapshots – Part 1 18 dicembre 2015 HOW-TO, AWS - Amazon
  • windows-logo
    How to – solve mfc140u.dll is missing Error in mfc VC++ 22 dicembre 2015 HOW-TO, Microsoft
  • aws-logo
    AWS – Lambda cron schedule examples 18 dicembre 2015 HOW-TO, AWS - Amazon
© Copyright 2015 - Smereghetti.com
Questo sito si serve dei cookie di Google per l'erogazione dei servizi, la personalizzazione degli annunci e l'analisi del traffico. Le informazioni sul tuo utilizzo del sito sono condivise con Google. Se prosegui la navigazione acconsenti all'utilizzo dei cookie.Accept Read More
Privacy & Cookies Policy