none
robocopy switches RRS feed

  • Question

  • Hello -- one of the many switches that robocopy has is /xf -- to exclude file(s)
    that are to be excluded --- the help

    (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy)

    notes that I can specify "wildcards" * and ? for the filename ---

    So I specified the option

    /xf foo.*

    and I got a error that this option was invalid

    Strictly speaking is the help noted that the filename, ie the part of the file
    identifier before the '.' can have the wildcard and not the file extension/type?

    Thanks in advance
    Tuesday, September 4, 2018 4:14 AM

All replies

  • Hi,

    we could check the permission on both the source and destination. Please refer to the link below.

    http://superuser.com/questions/25509/robocopy-permission-denied

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Also we could check the command about the robocopy.

    The /mir option is equivalent to the /e plus /purge options with one small difference in behavior:

    With the /e plus /purge options, if the destination directory exists, the destination directory security settings are not overwritten.

    With the /mir option, if the destination directory exists, the destination directory security settings are overwritten.

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

    Best Regards,

    Tao


    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, September 5, 2018 6:24 AM
    Moderator
  • Hi, We haven’t heard from you for a couple of days, have you solved the problem?

    Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, September 10, 2018 7:51 AM
    Moderator
  • Hello -- thanks for your reply -- The permissions are not the issue -- if this was the case, I would have got the 

    error during the copy process, in   this case the error was generated  as "bad syntax"   ad if would have 

    specified the  switch  /junk which does not exist 

     
    Monday, September 10, 2018 3:21 PM