- Home
- News
- Full Guide to Move Folders and Subfolders Using CMD
Command Prompt is a wonderful Windows-embedded tool to help Windows users fix computer errors, configure Windows settings, create zip folders, etc. Here, thisMiniToolpost will show you how to move folders and subfolders using CMD.
Command Prompt, also called CMD, is a command line interpreter utility that can exactly execute typed command lines. Do you know what kind of command lines can be used to move folders? You can keep reading and work with this tutorial to move folders and subfolders using CMD.
Way 1: Move Folders and Subfolders Using the Move Command
The move command line is used to move one or more folders from one directory to another. After running this command, the original folder will be deleted and the new one may have the same or different name. You can try this command with the following steps.
Step 1: PressWin + Rto open the Run window.
Step 2: Typecmdinto the text box and hitEnterto open Command Prompt.
Step 3: Typemove [<source>] [<target>]and hitEnter. For example, I need to move files in the fortest folder from E: drive to D:\RecoveryDestination. Then, I need to typemove E:\fortest\*.* D:\RecoveryDestination.*.*tells the computer that every file in this folder should be moved regardless of its extension.
Way 2: Move Folders and Subfolders Using the Robocopy Command
The robocopy command is powerful for copying files and directories from one location to another. You can use it to move files, mirror directories, add or remove attributes to the copied files, and more. Here I’ll introduce you to how to move multiple folders in CMD with this robocopy command.
Step 1: TypeCommand Promptin the Windows Search bar.
Step 2: Right-click on the best-matched option and chooseRun as administrator.
Step 3: Typerobocopy <source> <destination> /moveand hitEnter. Here, I’d like to move the fortest folder from E: drive to D:\RecoveryDestination; thus, the command line should berobocopy E:\fortest D:\RecoveryDestination /move.
Please note that after running this command, your file will be deleted from the original path. You can also run therobocopy /mirto mirror the directory and files to another place. However, this command will overwrite all files in the destination folder. Therefore, to run this command, you should ensure the destination folder has no important files or is an empty folder.
If your files are lost after running this command line, you should cease every operation and recover useful files with professionaldata recovery software, like MiniTool Power Data Recovery as files will not be sent to the Recycle Bin in this case.
MiniTool Power Data Recovery is capable of recovering lost files in various situations, including mistaken deletion, device corruption, device formatting, etc. You shouldrecover filesquickly to avoid data overwriting, leading to data being irrecoverable.
Way 3: Move Folders and subfolders Using the Xcopy Command
The full name ofXcopyis Extended Copy. You can run this command to copy multiple files and entire directories to another place. Compared with the robocopy command, it is easier with fewer options. Additionally, this command line doesn’t remove the original folder after copying.
Step 1: Open the Command Prompt in the way you like.
Step 2: Type the commandXcopy <source> [<destination>] /E /H /C /I. Similarly, taking the fortest folder as an example, the command line should beXcopy E:\fortest D:\RecoveryDestination /E /H /C /I.
/Erefers to copying all subfolders, including empty folders.
/Hrefers to copying hidden files and system files.
/Crefers to continuing the copy process notwithstanding the occurrence of errors.
/Irefers to assuming a new directory if the destination is wrong or doesn’t exist.
Bottom Line
This is all about how to move folders and subfolders using CMD. You can try the above three move folder command lines following the steps. Please note that the former two command lines will remove the original folder after executing the operation. You should be careful when using these command lines.
About The Author
Andrea Follow Us
Position: Columnist
Andrea graduated in English and has a keen interest in the IT industry and questions that arise when computers are used. She is passionate about new things and challenging things and has a wide range of interests like playing guitar, gaming, and crafting.