COPY

RECENT NEWS

12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...

TESTIMONIALS

Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...

More...

COPY

Copies files from one location to another.

Syntax:

COPY [/d] [/v] [/n] [/y | /-y] [/z] [/a | /b] Source [/a | /b] [+Source [/a | /b] [+ ...]] [Destination [/a | /b]]

/d – makes encrypted files saved as decrypted at the destination.

/v – verifies that files are written correctly.

/n – uses short 8.3 names (if available) for copied files.

/y – suppresses the overwriting file confirmation prompt.

/-y – enables the overwriting file confirmation prompt.

/z – copies files in restartable mode: if the copying process is interrupted, it will restart if possible.

/a – ASCII copying mode.

/b – binary copying mode.

Source – specifies the location of the file(s) or folder to be copied. Wildcards (?, *) are allowed.

Destination ‑ specifies the location to which you want to copy file(s) or/and folder(s).

Usage:

/a and /b options are applied to all files after them and before the following /a or /b option.

In ASCII mode COPY command copies only file data before the first end-of-file character.

Binary mode is the default mode of COPY command.

/v option significantly slows down the copying process.

To override /y option, use COPYCMD environment variable: SET COPYCMD=/Y.

You can combine files while copying them. The first way to combine them is specifying the single destination with multiple sources, the second one is to use + between file names (File1+File2+File3…).

If source or destination path contain spaces, they must be quoted.

COPY command does not support copying files with zero-size. Also it does not support copying subdirectories.

Examples:

Simple copying:

COPY d:\Work\SomeData\SomeFile.doc e:\Backup

Combining:

COPY d:\Work\SomeData\*.dat e:\Backup\AllData.dat

 

Subscribe batch files programming newsletter (no spam):

Subscribe

Unsubscribe