If you have struggled with how to copy or move large folders/subfolders from one drive to another, look no further. This article from tools will discuss a simpler alternative to using Xcopy to copy files. You will learn how to use Robocopy to copy folders and subfolders in Windows with specific commands. We will also introduce a third-party tool that you can use to automatically backup files to an external hard drive.

Yes, you can use Robocopy (Robust File Copy) command-line tool to move folders and their subfolders. Robocopy is a powerful file copying command built into the Windows operating system, offering advanced options like error handling, multi-threaded copying, and file filtering. To move folders and subfolders, you can use the following basic syntax: ```cmd robocopy /MIR ``` - ``: The path of the folder you want to move. - ``: The target path where you want to move the folder. - `/MIR`: Mirror mode, which mirrors the source directory to the destination. It will delete any files and subdirectories in the destination that don't exist in the source, but be cautious as it can remove extra files from the target. For example, if you want to move `C:\Source\Folder1` to `D:\Destination`, you would run the following command: ```cmd robocopy C:\Source\Folder1 D:\Destination /MIR ``` Make sure to back up important data before executing this, as the `/MIR` option can delete extra files from the destination. If you want to copy without removing the original folder, you can omit the `/MIR` parameter; however, by default, Robocopy doesn't overwrite existing files unless using `/MIR` or other overwrite options.

Using Robocopy command for making an exact copy
Posted by u/Qbccd in sysadmin

It's a popular topic on Reddit: How do you use the Robocopy command to copy files and folders?

Robocopy (Robust File Copy) is a command-line tool on Windows that enables you to move folders and subfolders between drives. It's particularly crucial for copying large datasets when other methods fail. With this tool, you can seamlessly move/copy folders and subfolders.

Using Robocopy to "move" a folder means that no copy of the files remains on the source drive, whereas "copying" a folder leaves a copy on the source drive. By entering specific commands in the Command Prompt, you can use Robocopy to "move" or "copy" files from a source location to a destination directory.

Here's a Robocopy command you can use to copy a folder and its subfolders:

    This command translates to:
  • robocopy C:\src E:\dst /E /COPYALL
  • In American English, this means: Using the Robocopy tool, it copies the entire contents of the directory C:\src, including all subdirectories (even empty ones) and their contents, to the destination E:\dst while preserving all file attributes.

We can break this command down as follows.

    <LI><B>C:SRC</B></LI> <LI><B>E:Dst</B></LI> <LI>/E Specifies that empty subfolders should be selected.</LI> <LI>/COPYALL Indicates that all contents should be copied.</LI>

In the next part, we will see how to use Robocopy to move/copy folders and subfolders.

In this article, you can learn what Xcopy is and how to use the Xcopy command to copy folders and subfolders in various scenarios.

Please provide the English content you want translated, and I'll translate it into Chinese for you as soon as possible.

Copy files and subfolders using Xcopy command

Copy Folders and Subfolders with Xcopy Command

In this article, you can learn what Xcopy is and how to use the Xcopy command to copy folders and subfolders in various scenarios. Read More >>

How to Use Robocopy to Copy Folders and Subfolders

Robocopy allows you to copy or move folders/subfolders between drives. If you want to keep a copy of the data on the source drive, you should use the "copy" command. However, if you want to copy the data and empty the source drive, you can use the "move" command. Here's how to apply both scenarios: 1. **Copying Folders/Files:** To copy a folder and its contents from one drive to another without deleting the original, use the following command: ``` robocopy Source_Directory Destination_Directory /S /E ``` Replace `Source_Directory` with the path of the folder you want to copy and `Destination_Directory` with the path where you want to copy it. 2. **Moving Folders/Files:** To move a folder and its contents, effectively deleting it from the source after the copy is complete, use this command: ``` robocopy Source_Directory Destination_Directory /S /E /MOV ``` Again, replace `Source_Directory` and `Destination_Directory` with the appropriate paths. The `/S` switch includes subdirectories (except empty ones), and `/E` switch copies subdirectories, including empty ones. The `/MOV` switch moves files after copying them. Remember to run the command prompt as an administrator for these operations, especially if you're dealing with system folders or files.

  1. Scenario 1: Using Robocopy to Copy a Folder and Its Subfolders
  2. Scenario 2: Using Robocopy to Move a Folder and Its Subfolders

Scenario 1: Using Robocopy to Copy a Folder and Its Subfolders

To use Robocopy to copy folders and their subfolders with permissions on a Windows computer, you first need to open the Command Prompt as an administrator. If you want to copy only the folder and exclude its subfolders, you can use the following command:

This command uses the Robocopy tool to copy the contents of the C:\src directory to the E:\dst directory. Robocopy is a built-in command-line utility in the Windows operating system designed to reliably copy files and folders.

Use the following command:

You can also copy all files, including NTFS permissions (ACLs), folders, subfolders, and other file attributes. For this, you need to add the "/E" command option to select all empty subfolders. Next, you can add the "/COPYALL" command option to copy any additional file components (multiple files).

Here's the full Robocopy command to copy all folders and subfolders:

The translation of this command in Chinese is: Use Robocopy to copy all contents (including subdirectories) from the C:\src directory to the E:\dst directory, and include all file attributes.

Input: robocopy C:\src E:\dst /E /COPYALL

Important: Make sure to replace "C" and "E" with the correct drive letters, and "src" and "dst" should represent the exact folder/subfolder names.

Scenario 2: Moving Folders and Subfolders with Robocopy

If you want to keep only copies of the files in the destination folder, use the "MOV" command. This will delete the files from the source folder and move the copies to the destination drive. Here's an example of a Robocopy command that moves folders (not including subfolders) from the source to the target drive:

The command robocopy C:\src E:\dst /MOV means to use the Robocopy tool to copy files from the C:\src directory to the E:\dst directory and delete the source files after copying. The /MOV parameter signifies that the files should be moved (copied and then deleted).

Input: robocopy C:\src E:\dst /MOV

This command will move the file from the "C" drive to the "E" drive. Replace the drive letters with the correct ones for your computer.

In addition to the "MOV" command option, you can use the "MOVE" command (note the difference) to transfer all files and folders. This command won't exclude subfolders or other file attributes like the previous commands. Here's how:

This command translates to: robocopy C:\src E:\dst /MOVE This indicates that the Robocopy tool should be used to move all files and subdirectories from the C:\src directory to E:\dst, and after moving, delete the files from the source folder. The /MOVE parameter specifies the move operation.

Input: robocopy C:\src E:\dst /MOVE

You can use the ROBOCOPY MOVE command when you want to delete any files from the source drive and keep only the copies on the destination drive.

If you find this blog helpful, please share it on social media platforms to help others benefit as well.

I apologize, but you have provided empty content. Please provide the English text that needs to be translated, and I will do my best to assist you with the translation into Chinese.

How to Use Robocopy for Network File Copying

You can also use Robocopy to move files across a network. The challenge with this approach is that you could experience a network interruption at any time. To address this, Robocopy lets you use the /Z command-line option to restart a file transfer if it's interrupted due to a network failure partway through.

This will prevent any transfer failures. Additionally, Robocopy allows you to add the "/FFT" command option to preserve file timestamps when copying over a network. Here's a command to easily copy files over a network: ``` robocopy Source_Directory Destination_Directory /S /E /FFT ``` In this command: - `Source_Directory` is the path of the folder you want to copy from. - `Destination_Directory` is the path of the folder where you want to copy the files to. - `/S` includes subdirectories, except empty ones. - `/E` copies subdirectories, including empty ones. - `/FFT` enables fast file time-stamping, which is useful for network transfers. Remember to replace `Source_Directory` and `Destination_Directory` with the actual paths.

The command in American English would be: Use Robocopy to copy from C:\src to \\SRV1\share, with restartability enabled and fast file timestamp comparison.

Enter robocopy C:\src \\SRV1\share /Z /FFT

This command allows Robocopy to transfer files via a network server share while preserving file timestamps (/FFT) and handling network interruptions (/Z).

In addition to the commands mentioned, you can add the /IPG switch to specify the packet gap option, which indicates the amount of time Robocopy waits between sending successive packets.

For All: Backup Files Automatically or Just Copy Them?

Instead of manually copying files from one drive to another using Robocopy for backup purposes, you can automate this process with dedicated backup software. A highly recommended tool for this job is Todo Backup. This free backup software lets you secure all your data with just a few clicks.

It lets you back up your drives or files to different spots, like the cloud, network, external drives, NAS, or local disks. There's no chance of losing your files during the automatic backup since the tool is super reliable. Whenever you wanna get your backups, Todo Backup makes it easy to restore them. You can put the backup data back on the same device or a new one.

Ya wanna smoothly backup all the data on your PC's hard drives without any hassle? Make sure you use something like Todo Backup. Just grab the free version, and you're good to go. Later on, if you need more fancy stuff, you can always upgrade to the premium one.

Step 1. Click the 'Select backup contents' option to start the backup process.

Create File Backup Step 1

Step 2: There are four backup types: File, Disk, System, and Email. Click on File.

Create File Backup Step 2

Step 3: On the left, you'll see all your local and network files. Expand the directories and select the backup file.

File Backup File Backup

Step 4: Follow the on-screen instructions and choose where you want to save your backup.

File Backup Step 4

Click on Options, set a password for encrypted backups under Backup Options, then click Backup Schedule to specify when the backup should occur and initiate backups at certain events. You can also select additional options to customize the backup process as needed.

Backup Options

Step 5: The backup can be stored on a local disk, the tool's online service, or a NAS.

File Backup Step 4

Step 6. Todo Backup lets you back up data to third-party cloud storage services as well as its own.

If you want to back up to a cloud drive provided by a third party, choose “Local Disk,” scroll down to add “Cloud Device,” and then add and log in to your account.

You can also choose to back up to the Tool Cloud. Sign up for a Tool account and then click Tool Cloud and log in.

Backup to Tool Cloud

Step 7. Click Backup Now to start the backup process. When it's done, the backup job appears as a card on the left pane. Right-click the backup job for more options.

File Backup Step 7

wrap-up work

This article shows you how to use the command line to use Robocopy to copy folders and subfolders on Windows. In addition to copying, Robocopy lets you seamlessly move folders and subfolders. Plus, you can copy files over a network as long as your PC is connected to the internet.

If you're looking for an alternative to manually copying your files for backup, you can try using the Todo Backup tool. This third-party data backup software allows you to quickly save your files to different locations and restore them when needed. To get started with Todo Backup, ensure that you have downloaded and installed it on your computer.

Frequently Asked Questions on Using Robocopy to Copy Folders and Subfolders

Here are some common questions about using Robocopy with folders and subfolders on Windows.

When copying subdirectories with Xcopy or Robocopy, which switch do you use?

The /X[O|C|L|N|P|Q|S|T|J|F|X|Z] switches, when used with XCOPY or ROBOCOPY, copy subdirectories. Here, /S copies only occupied directories; /E copies everything, including empty and occupied directories; and /T copies just the directory structure, without any files.

2. What is faster, Robocopy or Xcopy?

Robocopy is considered a faster alternative to Xcopy, primarily because it offers retry options when errors occur during file transfer, a feature that Xcopy lacks. This makes it a quicker choice since, if errors occur while copying data, you don't need to restart the entire process.

What are the drawbacks of Robocopy?

The main drawbacks of Robocopy include the following:

    • Complexity - Due to running in the command line, regular users need to invest time to get familiar with Robocopy commands.
    • Bugs - Robocopy is not entirely foolproof, as you might occasionally encounter issues or bugs.
    • Windows-only Support - You cannot use Robocopy on other operating systems like Linux or Mac.

Though it has its quirks, Robocopy remains useful.

4. Will Robocopy copy everything?

When copying files between folders or drives, Robocopy copies only those files whose source and target attributes differ – that is, size and timestamps. It therefore skips files with similar attributes in both the source and destination folders.