What does Robocopy mean by tweaked, lonely, and extra?

113

35

The Robocopy documentation for the option /it is simply “Includes ‘tweaked’ files”. What does “tweaked” mean?

The Robocopy documentation for the option /xl is simply “Excludes ‘lonely’ files and directories”. What does “lonely” mean?

sean e

Posted 2011-07-24T19:13:39.270

Reputation: 2 471

Answers

121

"Tweaked":

A Tweaked file is defined to be one that exists in both the source and destination, with identical size and timestamp, but different attribute settings.

"Lonely":

A "lonely" file is present in source but not destination; excluding lonely will prevent any new files being added to the destination.

"Extra" (the other one that isn't explained well):

An "extra" file is present in destination but not source; excluding extras will prevent any deletions from the destination.

More info here.

Ƭᴇcʜιᴇ007

Posted 2011-07-24T19:13:39.270

Reputation: 103 763

4I think the reply about "extras" is a bit misleading. It does not necessary delete files in the destination just because its listing extras? – Brimstedt – 2012-11-02T12:11:47.910

7According to the documentation, no action is ever performed on "Extra" files. They are simply reported in the program output log. If you include the switch "/XX" then they are not even reported in the program output. I don't know if it actually works that way, but no reason to doubt it... I have never tried it as a test case. – Kevin Fegan – 2012-11-28T18:57:47.923

8The /PURGE option will remove files that are no longer in the source (along with the /MIR option). Granted, I don't know what /XX /PURGE would end up doing... – Richard – 2013-07-26T17:32:34.613

109

"Tweaked", "Lonely", and "Extra" refer to RoboCopy "Classes" of files.

For each directory processed RoboCopy constructs a list of files matching the Include Filespecs, in both the source and destination directories. The program then cross-references these lists, seeing which files exist where, comparing file times and sizes where possible, and places each selected file in one of the following classes:

File        Exists In   Exists In        Source/Dest     Source/Dest   Source/Dest
Class       Source      Destination      File Times      File Sizes    Attributes
=========== =========== ================ =============== ============= ============
Lonely      Yes         No               n/a             n/a           n/a
Tweaked     Yes         Yes              Equal           Equal         Different
Same        Yes         Yes              Equal           Equal         Equal
Changed     Yes         Yes              Equal           Different     n/a
Newer       Yes         Yes              Source > Dest   n/a           n/a
Older       Yes         Yes              Source < Dest   n/a           n/a
Extra       No          Yes              n/a             n/a           n/a
Mismatched  Yes (file)  Yes (directory)  n/a             n/a           n/a

By default, Lonely files (and directories) are always copied, unless /XL switch is used. Changed, Newer and Older files will be considered to be candidates for copying (subject to further filtering described below), Same files will be skipped (not copied), and Extra and Mismatched files (and directories) will simply be reported in the output log.

Normally, Tweaked files are neither identified nor copied – they are usually identified as Same files by default. Only when switch /IT is used will the distinction between Same and Tweaked files be made, and only then will Tweaked files be copied.

Use the following switches to override this default behaviour:

Switch   Function
======== =====================
/XL      eXclude Lonely files and directories.
/IT      Include Tweaked files.
/IS      Include Same files.
/XC      eXclude Changed files.
/XN      eXclude Newer files.
/XO      eXclude Older files.

Use the following switch to suppress the reporting and processing of Extra files:  
/XX      eXclude eXtra files

I found documentation for RoboCopy versions XP010 (Windows XP) and 1.70. If I find documentation for versions XP026 or XP027 (Windows 7), I will link to them here.

Edit (danpritts) - They don't specify the version number of robocopy but here are (less detailed) Windows 7/8/2008/2012 robocopy Docs

Kevin Fegan

Posted 2011-07-24T19:13:39.270

Reputation: 4 077

@Kevin, Wow, this is good stuff dude. Btw, is there a place to download old versrions of RoboCopy? – Pacerier – 2016-05-04T03:12:59.473

@Pacerier - You can get a copy of Robocopy.exe from the "Windows Server 2003 Resource Kit Tools" by downloading rktools.exe here: https://www.microsoft.com/en-us/download/details.aspx?id=17657 . This contains Robocopy Version XP010. If you don't want to install the full package, just UNZIP rktools.exe into a temporary folder. This will extract rktools.msi (and 2 ".cab" files), then UNZIP rktools.msi. You will get Robocopy (Version XP010) and Robocopy.doc.

– Kevin Fegan – 2016-05-08T02:25:12.330

@Pacerier - You can also get a copy of Robocopy.exe Version XP026 which is included in the Robocopy GUI here: http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx

– Kevin Fegan – 2016-05-08T02:25:30.503