none
Need more in depth explanation of Robocopy switchs /xct and /xn RRS feed

  • Question

  • I am hoping I can get some very difinitive answers to the following robocopy switches:

    /xct - Excludes changed files

    /xn - Excludes new files

    Does it exclude files that have changed or are new on the source or destination?

    Here is the situation I am working with.

    We are migrating a large file share - 1.4 TB. Due to the amount of files (over 2 million) the process is taking a significant amount of time. Ideally I'd like to keep my users out of the shares so a full sync can occur but that isn't going to happen. Because of that files may get changed on both the source and destination. What I am looking for is a set of command options to copy files that are newer on the source than the destination, but also aware not to overwrite if a file is newer at the destination.

    Any clarification would be appreciated.

    Tuesday, May 21, 2013 6:43 PM

Answers

  • Maybe a third switch?

    /XO :: eXclude Older files; if the file about to be copied will replace an existing copy in the target, the newer of the two files will survive. If they are of the same age, the copy will not be performed.

    Danger: Allowing access to both sites could result in lost data, even with the procedure you are trying to put in place.  Example.  Destination site copy is modified extensively.  Person ends work and closes the file at 5pm.  Source site copy is opened at 5:30 and one slight change is made.  Task is run at 6pm.  Destination copy is overwritten and all work is lost.


    .:|:.:|:. tim

    Tuesday, May 21, 2013 7:19 PM
  • Hi,

    For robocopy command, I would like to suggest you refer to the below article:

    http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx

    Regards,

    Yan Li


    Cataleya Li
    TechNet Community Support

    Friday, May 24, 2013 6:53 AM
    Moderator

All replies

  • Maybe a third switch?

    /XO :: eXclude Older files; if the file about to be copied will replace an existing copy in the target, the newer of the two files will survive. If they are of the same age, the copy will not be performed.

    Danger: Allowing access to both sites could result in lost data, even with the procedure you are trying to put in place.  Example.  Destination site copy is modified extensively.  Person ends work and closes the file at 5pm.  Source site copy is opened at 5:30 and one slight change is made.  Task is run at 6pm.  Destination copy is overwritten and all work is lost.


    .:|:.:|:. tim

    Tuesday, May 21, 2013 7:19 PM
  • Hi,

    For robocopy command, I would like to suggest you refer to the below article:

    http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx

    Regards,

    Yan Li


    Cataleya Li
    TechNet Community Support

    Friday, May 24, 2013 6:53 AM
    Moderator
  • Hello, this response did not answer the OP’s question because all it does is refer to an article already quoted by the OP.  Downvote, and boo.
    Monday, June 12, 2017 3:02 PM
  • This is not an appropriate answer @yan li.  It does not answer the question of what the `xct` flag does.
    Monday, June 12, 2017 3:03 PM