Articles Computer How to Copy Folder to another Folder in Windows Command Prompt

copy folder

How to Copy One Folder to another Folder in Windows Command Prompt

Windows CMD (Command Prompt) has many features that help users communicate directly with the operating system. It helps complete tasks by executing the relevant commands. Familiar with some common basic commands can help us get the job done efficiently.

Last time we used PowerShell and CMD to modify the password of local accounts and unlock the disk drive encrypted by the BitLocker. This time we're going to use it to transfer files or copy folders to another folder. See how it is implemented.

How to Copy Folder to another Folder in Windows Command Prompt

Option-1: Copy all the files in a folder to another with the COPY command.

You should be attention that this copy method cannot copy the invisible files. If you need to copy invisible files, please refer to the next method.

Search for CMD directly in the search bar and click to run it. The following command cannot copy hidden files. The command is to copy all files under folder "d" to another folder "a", although they locate in different hard disk drive. We can definitely realize it by CMD.

copy D:\d*.* J:\a

Note:If the name of the file in the folder directory contains spaces, you need to put the above command in double quotes. Both "Text Document. txt" and "Microsoft Word.docx" are named with space, so we shall use the double quotes.

copy "D:\d\*.*" J:\a

use copy command to copy folders

Option-2: The Robocopy command automatically copies hidden files and system files.

This option enables you to copy hidden files and system files. Besides, it can quickly copy the entire folder. Copy the contents of multiple folders or folders in a directory:

robocopy D:\d J:\a /e

Note:" /e" tells the robocopy command to copy everything that contains all subdirectories. This also includes blank folders. And this command line is to copy folder from D:\d to destination folder J:\a\ .

use robocopy command to copy folders

Related Articles