How To Copy Files From One Drive To Another Using CMD?

483 Views
0 rating based on 0 reviews

The article deals with the Command Prompt commands to copy files from one drive to another. The shift command is used to move or copy files and folders from a location to another in MS-DOS environment. Users can use the command to shift their files instead of using the cut and paste functions in order to avoid end user confirmation process.

Copy Files from One Drive to Another using CMD

When using several disk drives, sometimes you may have to copy all the files of a folder or a particular file from one local drive to another. Also, you may have to transfer or download files from a USB drive to your PC’s drive. For that, you can apply the copy-paste option or the command prompt.

Copying files from One Drive to Another applying CMD

  1. First, you have to know the location of the file that you wish to copy. You can get it by selecting the URL bar at the top of the file in File Explorer. For example, it will be like this: “C:UsersFile.” Copy the file directory on the notepad.Copy the file location
  2. You also have to know the file name. As Command Prompt is case-sensitive, you have to put the name as precisely as it is.
  3. Access the “Start” menu and put “command prompt” in the search field. Select the “Command Prompt” application from the search result and open it.Access the Command Prompt application
  4. Put the “Change Directory” command “cd” in the CMD screen. Then, give space and put the location of the file you wish to copy. Hit “Enter.” Command Prompt will find the desired file from the PC.Put the file location and cd command
  5. Then, put the “copy” command to give a space. Write the file name, including the extension. Remember that if the file name has space between the words, you must put quotation marks in the command prompt window. For example, if the file name is “Good Flower Picture,” the name will be in command prompt as “ Good” “Flower” “Picture.png ”.Put the file name
  6. Put the destination location beside the file with space. Hit “Enter,” and it will copy the file. If you do not give any destination location, it will automatically copy the file to its current location.Type the destination beside the file name
  7. To copy the file between drives, type the drive name before and after the file, including the “copy” command. For example, the “copy c:/desiredfile.png d:” command will copy the file from “C Drive” to the “D Drive.”
  8. Now, for copying all files of the same extension to another drive, write the “copy *.png d:” It will copy every “png” file to the “D Drive.” Always put a colon “:” after the drive in the command.
  9. To copy every file of a particular folder, again put “cd” in the command prompt and give a space. Then, write the folder location that you wish to copy.
  10. Type the “robocop” command beside it and put a space. Write the folder name. You will also have to use quotation marks if the folder name has “Space,” the same as before.Put the robocopy command
  11. After that, add a space and put the destination location, and it will copy every file of the selected folder to the destination folder. But it will not copy the folder itself, only the files.
  12. There is also some “xcopy” command that you can apply to copy every file of a folder. The commands are “xcopy /h /c /k /e /r /y”. Here, the “/h” command copy the system and hidden files and the “/e” command copy the empty files, respectively.
  13. The “/c” command copies the files without interruption. The “/k” command line retains the “read-only” attribute in the read-only files. The “/r” and “/y” overwrite files and permits them to overwrite, respectively.

Summary: Copy Files from One Drive to Another using CMD

  • Steps to Copy Files from One Drive to Another using CMD
  • Open Windows Command Prompt.
  • The syntax for copying files from one drive to another in MS-DOS is as follows.
  • Copy [source] [destination]
  • For example, the command below copies a file called test.txt from the "C" volume of the hard drive to the "E" volume of the hard drive.
  • Copy c:\test.txt e:\test.txt