Copy is one of the most important commands in MS-DOS console. As its name, copy command has function to copy a single file or multiple files to a destination folder or a COM or LPT port (usually in binary format). With copy command you also can create a text file or combines multiple file to a single text file. Also you need to know that copy command is internal command, that's means the command is included in command.com file. So you wouldn't find the copy.exe or copy.com inside Windows folder.

Obviously, copy command is an important command for us, especially if you're a MS-DOS user.
Copy command has syntax : copy /parameters [source] [destination]
Copy command has several parameters. These are its parameters :

  • /d : this parameter save destination as decrypted file if the source is encrypted file.
  • /v : this parameter to verify that the files are copied and written to the destination correctly.
  • /n : this parameter to save destination file as per 8.3 filename format.
  • /y : to suppress the warning message when the file being copied will overwrite an existing file with the same name at the destination.
  • /-y : contrary to /y parameter, this parameter will display the warning when the being copied will overwrite an existing file in destination folder.
  • /z : this parameter is used to copy file from a network destination in resume mode. So if you lost connection when copying from a network destination, repeat to copy again with this parameter.
  • /a : will copy source file in ASCII format, you must put the parameter after source or destination.
  • /b : will copy source file in binary format, you must put this parameter after source or destination, for example : copy source.txt /a c:\data.
  • + : use this when you want to combines multiple file, for example : copy 1.txt + 2.txt + 3.txt result.txt

That's it. You can combine them for your own need. So I want to write some examples :
copy 1*.txt c:\data (using wilcard to copy all files which have first letter of filename 1 to data folder)
copy 1.txt /a > LPT1 (to send file 1.txt contain to device that connected to LPT1 port.)
copy 1.txt 2.txt (will copy 1.txt to 2.txt, so you have 2 files identically but with different filename)

And once again, you also can create a text file with copy command, like this : copy con 1.txt [hit enter] then type your text and then if you already finish, typing press Ctrl + Z keys to save it and then 1.txt file will created.

Indeed, there so many people’s like using Windows Explorer than copy command because Windows Explorer works in GUI mode but copy command has positive side too. With copy command you can use /z to resume the unfinished copying progress in local network, you can send to certain device through port, and you can use it into batch file to create powerful routine commands.

0 comments