The command line supports several types of copy commands:
Copy: If you just want to copy files or folders from location to the other.
Xcopy: A robust copy option suitable for copying the contents of a folder with subfolders to a destination folder. Xcopy is being superseded by Robocopy which provides the same functionality.
Here are some examples how to use these copy commands.
I want to copy the PowerPoint presentation named Evolution of the Settings interface.pptx to the Work folder located in the Groovy folder we created earlier. First, change your directory to the location of the file.
In my case, the PowerPoint file is in my User folder under Documents. First, type the copy command, followed by a file name with open and close quotes then the file path destination, example: copy “Evolution of the Settings interface.pptx” c:\Users\Andre\Documents\Sample\Groovy\Work
Since Robocopy has superseded Xcopy, we are just going to focus on using that command for this example. Robocopy includes a number of arguments you can use to copy lots of folders thoroughly. It’s particularly great for creating backups. For instance, if I want to make a backup copy of my Downloads folder to a folder on my thumb drive named Backup, this is how you do it.
robocopy “D:\Users\Andre\Downloads” “F:\Backup”
Learn more: https://www.groovypost.com/howto/10-command-lin...