4/16/2008: Please see the Read Me First page before creating new pages (and also if you plan to edit any; you can help clean up the site while you improve/expand the content). --OS-9 Al

COPY

From CoCoWiki

Jump to: navigation, search

COPY

COPY is creates a copy of a file, either with the same name in another location, or with a different name anywhere.

Syntax: COPY [<opts>] <srcpath> [<dstpath>] [<opts>]

Options  :

 -a = abort on error
 -p = don't print files copied (use with -w)
 -r = rewrite destination
 -s = single drive copy 
 -v = verify the copy
 -w=<dir> = copy to <dir>
 -x = copy from execution directory

COPY will fail with ERROR 218 (File already exists) if the destination file already exists. Using the -r option will prevent the error and replace the current file with the one being copied.

The -w option is needed when working with wildcards. (Remember to type : before the command when using wildcards)

Examples:

:copy /d1/MY_FILES/*.txt -w=/r0

Will copy all the files with the extension .txt from /d1/MY_FILES to the Ramdisk /r0

:copy /dd/CMDS/* -w=/d1/CMDS -r

Will copy all the files from /dd/CMDS to /d1/CMDS , replacing any already existing one.


Equivalent / similar commands in other OSs

Personal tools
CoCo Stuff