Robocopy For Mac

Posted on  by
  1. How To Use Robocopy
  2. Robocopy Mac Files
Robocopy

On Windows 10, Robocopy (Robust File Copy) is a powerful file management command-line tool with a slew of options to transfer files and folder to another location faster and more reliably than using File Explorer.

However, by default, Robocopy transfers everything on a given path, which may not be ideal on every scenario as you may have specific files and folders in a location that you don’t want to copy. Thankfully, the tool includes a least to switches that you can use to exclude files and folders from a copy process.

Unlike other built-in file copying commands such as Copy and XCopy, Robocopy is designed for reliable copy or mirroring of entire folders of any size, and in the copying process, ensure that all NTFS ACLS, attributes, owner information, alternate data streams, auditing information, timestamps and properties are copied except security information unless explicitly requested with /COPYALL switch. The current file storage is on windows, and unfortunately some of the users that connect to it from the Mac have named folders ending in spaces 'My Folder ' or files that end in '.' Which are not honored on windows, and cannot be copied by programs like robocopy.

In this guide, you’ll learn the steps to copy data using Robocopy on Windows 10 but excluding those files and folders that you don’t need to transfer.

  • How to exclude a folder using Robocopy
  • How to exclude a file using Robocopy
  • How to exclude a file and folder using Robocopy
  • How to exclude a folder using Robocopy

    To copy a folder with its content but excluding a specific folder, do the following:

    1. Open Start.

    2. Search for Command Prompt, right-click the result, and select Run as administrator.

    3. Type the following command to copy the files and folders excluding a specific folder to another location and press Enter:

      Exclude a folder using Robocopy alternative example:

      Exclude a folder using Robocopy wildcard example:

      Exclude multiple folders using Robocopy example:

    Once you’ve completed the steps, all the data from the path will be copied over excluding the folders you specified in the command exclude_folder_file_robocopy.

    How to exclude a file using Robocopy

    To copy a folder with its content but excluding a particular file, do the following:

    1. Open Start.

    2. Search for Command Prompt, right-click the result, and select Run as administrator.

      Uplet: post to Instagram from Mac, upload, edit and send any number of pictures in one go. Learn how to upload multiple photos and videos to Instagram from Mac. This Instagram uploader adds a batch of photos to your account in one click, keeping the original resolution and quality. Nov 29, 2016  Uploader for Instagram is an easy to use Instagram uploader to upload any media to your Instagram account. Supper easily post to Instagram. Free

    3. Type the following command to copy the files and folders excluding a specific file to another location and press Enter:

      Exclude a file using Robocopy alternative syntax example:

      Exclude a file using Robocopy wildcard example:

      Exclude multiple files using Robocopy example:

    After completing the steps, Robocopy will copy all the files and folders from a particular location excluding the files you specified in the command using the /XF switch.

    How to exclude a file and folder using Robocopy

    If you need to copy an entire folder but excluding a particular file and folder, do the following:

    1. Open Start.

    2. New os for mac. Search for Command Prompt, right-click the result, and select Run as administrator.

    3. Type the following command to copy the files and folders excluding certain files and folders to another drive and press Enter:

    Once you’ve completed the steps, all the content will be copied to the new location except those files and folders you excluded in the command using the /XD and /XF switches.

    Robocopy command switches explained

    Robocopy has a lot of features, and in the command shown in this guide, we’re using the following switches to make copy data excluding certain files and folders.

    How To Use Robocopy

    • /E — Copy Subdirectories, including empty ones.
    • /Z — Copy files in restartable mode.
    • /ZB — Uses restartable mode, if access denied use backup mode.
    • /R:5 — Retry 5 times (you can specify a different number, default is 1 million).
    • /W:5 — Wait 5 seconds before retrying (you can specify a different number, default is 30 seconds).
    • /TBD — Wait for sharenames To Be Defined (retry error 67).
    • /NP — No Progress – don’t display percentage copied.
    • /V — Produce verbose output, showing skipped files.
    • /XD — Excludes folders matching the path and folder name.
    • /XF — Excludes files matching the path and file name.

    The most important switches in these command are the /XD that allows you exclude folders and /XF that you can use to exclude files. The other switches are optional, but they are recommended options that you should use in any standard copy process using Robocopy.

    Robocopy Mac Files

    If you need additional help getting Robocopy to work, remember that you can submit your questions in the Pureinfotech forums.

    Weekly Digest: Windows 10 Spring Creators Update, Edge on iPad, tech tipsHow to enable or disable Cortana on Microsoft LauncherDifficulty level: AdvancedHow-ToWindows 10Windows 10 Help

    Some of our links are affiliate links which allow us to make a small percentage of the sale. It costs nothing extra on your part and helps to keep offering the content free and maintain the site. Learn more.

    All content within this website is available as best effort to help. Use the contents of the website at your own risk. Also, it’s always recommended to keep an up-to-date backup of your device and files before making any changes. Learn more.

    For You

    If you are looking for an alternative to Windows Robocopy for Mac OS X, look no further. The copy files (cp) command in Terminal works just like Robocopy.CP will copy files in OS X and preserve their structure and attributes. You can also see in real-time the files being copied using the verbose switch. Let’s got started.

    1. Open Terminal (Applications -> Utilities -> Terminal)

    2. In Terminal, type man cp to output all the CP commands. In this guide, we will only be concerned with the following switches below for our file copies from hard drive to hard drive.

    *If you were copying files into a directory with similar files, we would add the below switches to ensure only new files are copied and are not re-copied.

    -n Do not overwrite existing files -R Copies source files directories and any symbolic links.

    3. Let’s start a copy. Type cp –apv SOURCE TARGET and hit return, similar to below.

    Here’s an example of copying example.txt from external drive VOL to another external drive called VOL-NEW.

    The copy will begin and you can see in real-time (we used the –v switch for verbose mode) in the Terminal window. Once the copy completes, your Terminal screen will be at normal prompt.

    You can monitor the size of folder copies by Right Click -> Get Info.