The Command Prompt, or CMD, is an integral Windows utility that enables you to automate various tasks on your PC, including the relocation of folders and their subfolders. Are you familiar with how to move folders and subfolders in CMD? There are several commands available for using CMD to move files. In this article, we will explore four methods to transfer folders and subfolders using distinct CMD commands. Keep reading to understand how each command operates.

Why Use CMD to Move Files and Folders?

The first reason for relocating folders and subfolders using the Command Prompt (CMD) is security. When you transfer your files using this method, the likelihood of them being compromised by viruses is significantly reduced. This is in contrast to alternative methods like using a USB drive. The second reason to employ CMD for moving folders is its speed.

Once you become familiar with typing the specific move commands, CMD enables you to swiftly relocate folders and subfolders between different directories. The third advantage is that CMD is pre-installed on your Windows operating system, eliminating the need to download or update any software prior to usage. Some common command lines you can utilize to move folders and subfolders in CMD include the Move command, Robocopy, PowerShell, and Xcopy.

How to Easily Move Folders and Subfolders

Transferring folders and subfolders using the Command Prompt can be tedious, especially if you're not familiar with the various commands. A simpler method to move your files is through free backup software like Todo Backup. Since moving files to another drive essentially serves as a backup method, Todo Backup provides a more efficient approach for accomplishing this task.

With this software, there's no need to enter any commands in CMD before backing up your files. It enables you to backup your folders and subfolders to various locations, including the cloud, NAS, network, external drives, and local storage. The tool offers different backup strategies, like incremental and differential backups, as well as encrypted and scheduled backups, to cater to your diverse backup requirements.

Todo Backup is one of the best file sync software for Windows. It enables you to synchronize files between hard drives or computers. Whenever you need to access your backup data, you can conveniently retrieve it. You have the option to restore it to its original path or a new location.

To start using the Todo Backup tool right away, first download and install it on your PC. Then, just follow simple steps to begin backing up your folders and subfolders.

Step 1. To start a backup, click the Select backup contents option.

create file backup step1

Step 2. There are four data backup categories: File, Disk, OS, and Mail. Click on File.

create file backup step2

Step 3. On the left, both local and network files will be displayed. You can expand the directory to select the backup files.

File backup

Step 4. Follow the on-screen prompts and select a location to save the backup.

File backup step4

Click Options to encrypt the backup with a password in Backup Options, then click Backup Scheme to set the backup schedule and initiate the backup upon a specific event. You can also select additional options to customize the backup process according to your needs.

Backup options

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

file backup step4

Step 6. Todo Backup allows users to back up data to both a third-party cloud drive and its own cloud drive.

If you want to back up data to a cloud drive provided by a third party, select Local Drive, scroll down to add Cloud Device, and then add and log in to your account.

Backup to cloud
You can also opt for the Todo Backup Cloud drive. Sign up for a Todo Backup Account, then click on Todo Cloud and log in.

backup to tools cloud

Step 7. Click Backup Now to initiate the backup process. Once completed, the backup job will appear as a card on the left side of the panel. Right-click the backup job to perform additional actions on it.

File backup step7

Share this post on your social platforms to help more people discover an easy method for backing up their files or folders!

 

4 Ways to Move Folders and Subfolders in Command Prompt

Command Prompt provides a convenient platform for transferring files on your computer. In this section, we will explore four methods to achieve this using CMD. Here's an overview of the approaches:

Method 1: Move Folders and Subfolders Using the Move Command

The "move" command in Command Prompt (CMD) enables you to conveniently shift files from one location to another. The syntax for the command is: move [source] [destination]. After moving the folders, they will no longer be present in their original location. To utilize the "move" command in CMD, follow these steps:

Step 1. Launch the Command Prompt as an administrator.

Step 2. Enter the following command and press Enter (make sure to replace the drive paths with the correct ones on your computer):

  • Move "C:\Users\This Is Bethwel\Personal\Sample 1.docx" *.* "E:\usb4"

Use Move Command to move folders and subfolders

Step 3. That's it! The system has successfully transferred the .docx file from the C: drive to the E: drive. The *.* notation tells the system to move all file types present.

Method 2: Move Folders and Subfolders with Robocopy

The Robocopy command enables you to replicate directories or move files, along with modifying file attributes. The fundamental syntax for Robocopy is robocopy [source] [destination] /move. To copy folders and subfolders using Robocopy, follow these steps:

Step 1. Type cmd in the Windows search bar and choose "Run as administrator."

Step 2. When the Command Prompt window opens, type the command below and press Enter (make sure to replace the drive paths with the correct ones on your computer):

  • robocopy "C:\Users\This Is Bethwel\Personal" "E:\usb3"

Move folders and subfolders using Robocopy

Step 3. The system will delete the folders and their subfolders from the C: drive and move them to the E: drive.

Method 3: Move Folders and Subfolders with PowerShell

PowerShell enables the automation of various tasks on your computer, including the swift movement of folders and their subfolders between different locations. The basic syntax for this operation is: ```sql Move-Item -Path [source path] -Destination [target path] -PassThru ``` The `-PassThru` command instructs the system to display the results of the move operation. Here are the steps for moving files using PowerShell:

Step 1. Head to the search bar and type "powershell."

Step 2. When "Windows PowerShell" appears in the results, select "Run as administrator."

Run as administrator

Step 3. Next, copy and paste the following command and press Enter (make sure to replace the drive paths with the correct ones on your computer):

  • Move-Item -Path "C:\Users\This Is Bethwel\Personal" -Destination "E:\usb7" -PassThru
  • This command in PowerShell moves the folder located at "C:\Users\This Is Bethwel\Personal" to the destination "E:\usb7" and passes through the confirmation to proceed with the move operation.

move folders and subfolders using PowerShell

Step 4. The system will transfer the files to the target folder. It will then proceed to delete all the files and folders from the original drive.

Method 4: Move Folders and Subfolders Using the Xcopy Command

Another method to transfer files using CMD is through the Extended Copy (Xcopy) command. This command allows you to copy files from the source to the destination without any deletion. The basic syntax for Xcopy is Xcopy [source] [destination] /E /H /C /I. Let's break it down further: - /E: Includes subdirectories, even if they are empty. - /H: Copies hidden and system files as well. - /C: Continues copying even if errors occur. - /I: If the destination is a directory or doesn't exist, it assumes that you want to create one. So, for example, if you want to copy all files and subdirectories from "Folder1" to "Folder2", the command would be: Xcopy C:\Path\to\Folder1 C:\Path\to\Folder2 /E /H /C /I Remember to replace "C:\Path\to\Folder1" and "C:\Path\to\Folder2" with the actual paths of your source and destination folders.

  • /E- tells the system to copy all folders, including empty ones.
  • /H- directs the system to copy hidden folders and subfolders, as well as system files.
  • /C- instructs the system to continue transferring files even if an error occurs.
  • /I- tells the system to create a new directory at the destination if one does not already exist.

Here are the steps to move folders and subfolders using Xcopy:

Step 1. Open the Run dialog box and type "cmd." Click OK to launch the Command Prompt.

Step 2. Type the following command in the Command Prompt window and then press Enter (make sure to replace the drive paths with the correct ones on your computer):

Xcopy "C:\Users\This Is Bethwel\Personal" "E:\usb5" /E /H /C /I This command translates to: Copy everything recursively from the directory "C:\Users\This Is Bethwel\Personal" to the destination "E:\usb5", including hidden and system files, continue if errors occur, and create destination directories if they don't exist.

move folders and subfolders using Xcopy

Step 3. The above Xcopy source destination command will copy multiple files from the source to the destination without removing them from their original location.

In conclusion

You can move folders and subfolders in Command Prompt (CMD) by utilizing the "Move" command, Robocopy, PowerShell, or Xcopy. The first three methods will remove files from the original source folder, whereas Xcopy will keep a copy. It's crucial to ensure you have backups of your files elsewhere before using these commands to move them. This precaution helps prevent accidental data loss.

Tools Todo Backup is an efficient tool for data backup and recovery. It enables you to save folders and their subfolders to various locations such as cloud, network, NAS, local storage, and external hard drives. Make sure to download a free version of Tools Todo Backup today and explore its functionality.

Frequently Asked Questions (FAQs) on Move Folder Command Line

Here are some frequently asked questions about moving folders and subfolders using the Command Prompt (CMD) in English: 1. **How do I move a folder to another location using CMD?** To move a folder, use the `move` command followed by the source folder path and the destination path. For example: ``` move C:\Source\Folder C:\Destination ``` 2. **Can I move a folder along with its subfolders using CMD?** Yes, the `move` command will also move all subfolders and their contents by default. 3. **What if the destination folder already exists?** If the destination path already contains a folder with the same name, the move operation will overwrite the existing folder without prompting, unless you use the `/Y` option to confirm overwriting. 4. **How do I move multiple folders at once?** You can't directly move multiple folders in a single command, but you can write a batch script to iterate through each folder and move it. For example: ``` @echo off move C:\Source\Folder1 C:\Destination move C:\Source\Folder2 C:\Destination ``` 5. **How do I move a folder to a network location?** Use the full UNC path for the destination, like: ``` move C:\Local\Folder \\Server\Share ``` 6. **Can I move a folder within the same directory?** Yes, just specify a different folder name at the destination if needed: ``` move C:\Folder\OldName C:\Folder\NewName ``` 7. **Is there an equivalent command for moving folders in PowerShell?** Yes, in PowerShell, you can use the `Move-Item` cmdlet: ``` Move-Item -Path "C:\Source\Folder" -Destination "C:\Destination" ``` Remember to replace "Source" and "Destination" with the actual paths of your source and destination folders.

1. How Can I Move a Folder from One Directory to Another in Windows Command Prompt?

You can accomplish that using the following options:

    • The Move command.
    • Robocopy.
    • Powershell.
    • Xcopy.

The above sections of this article have discussed these command lines in detail.

2. How Do You Move a Directory in CMD?

You can alter the directory location in CMD by utilizing the "cd" command. Type "cd" in the Command Prompt window, followed by the path of the new directory you wish to access, such as "cd C:\Users\This Is Bethwel". After that, press Enter to implement the change.

3. How do I move files to another folder instead of copying them?

To use the "Move" command in Command Prompt to shift a file from its original location to a new one without leaving a copy, follow these steps to move a folder from one folder to another: 1. First, open the Command Prompt (CMD). You can do this by typing "cmd" in the search bar and hitting Enter. 2. In the Command Prompt window, use the `cd` command to navigate to the directory containing the file or folder you want to move. For instance, if your file is in the "C:\Users\YourUsername\Documents" folder, you'd type: ``` cd C:\Users\YourUsername\Documents ``` Press Enter to execute the command. 3. Once you're in the correct directory, use the `move` command with the following format to move the folder: ``` move /Y source destination ``` Here, `source` is the path of the folder you want to move, and `destination` is the path of the target folder. For example, if you want to move a folder named "OldFolder" to "C:\Users\YourUsername\Downloads", you'd input: ``` move /Y OldFolder C:\Users\YourUsername\Downloads ``` The `/Y` parameter is optional, and it confirms overwriting existing files or folders in the target folder without additional prompts. 4. Hit Enter to execute the command. If everything goes well, the folder will be moved to the designated target location. Keep in mind that you might not be able to move certain files or folders if you don't have administrator privileges. In such cases, you may need to run the Command Prompt as an administrator.

Step 1. Launch the Command Prompt as an administrator.

Step 2. Copy and paste the following command, then press Enter (make sure to replace the drive paths with the correct ones for your computer):

  • Move "C:\Users\Your User Name\Personal\Sample 1.docx" *.* "E:\usb4"

Step 3. This command transfers all .docx files from the C: drive to the E: drive. The *.* notation tells the system to move every file, regardless of its file extension.