Difference between revisions of "Shell Commands/Copy"
From MorphOS Library
(Created page with "'''Copy''' - Copies a source file or directory to another directory FROM/M, TO, PAT=PATTERN/K, BUF=BUFFER/K/N, ALL/S, DIRECT/S, CLONE/S, DATES/S, NOPRO/S, COM=COMMENT/S, QUI...") |
|||
Line 2: | Line 2: | ||
FROM/M, TO, PAT=PATTERN/K, BUF=BUFFER/K/N, ALL/S, DIRECT/S, | FROM/M, TO, PAT=PATTERN/K, BUF=BUFFER/K/N, ALL/S, DIRECT/S, | ||
− | CLONE/S, DATES/S, NOPRO/S, COM=COMMENT/S, QUIET/S, NOREQ/S, | + | CLONE/S, DATES/S, NOPRO/S, PROX/S, COM=COMMENT/S, QUIET/S, NOREQ/S, |
ERRWARN/S, MAKEDIR/S, MOVE/S, DELETE/S, HARD=HARDLINK/S, | ERRWARN/S, MAKEDIR/S, MOVE/S, DELETE/S, HARD=HARDLINK/S, | ||
SOFT=SOFTLINK/S, FOLNK=FORCELINK/S, FODEL=FORCEDELETE/S, | SOFT=SOFTLINK/S, FOLNK=FORCELINK/S, FODEL=FORCEDELETE/S, | ||
Line 19: | Line 19: | ||
to the TO file. The TO file is given standard protection bits | to the TO file. The TO file is given standard protection bits | ||
or r, w, e, and d. | or r, w, e, and d. | ||
+ | PROX - only copy X,S,P protection bits | ||
COMMENT - the comments of the FROM file are copied to the TO file. | COMMENT - the comments of the FROM file are copied to the TO file. | ||
QUIET - suppresses output messages/errors and requesters. | QUIET - suppresses output messages/errors and requesters. |
Latest revision as of 17:54, 6 March 2015
Copy - Copies a source file or directory to another directory
FROM/M, TO, PAT=PATTERN/K, BUF=BUFFER/K/N, ALL/S, DIRECT/S, CLONE/S, DATES/S, NOPRO/S, PROX/S, COM=COMMENT/S, QUIET/S, NOREQ/S, ERRWARN/S, MAKEDIR/S, MOVE/S, DELETE/S, HARD=HARDLINK/S, SOFT=SOFTLINK/S, FOLNK=FORCELINK/S, FODEL=FORCEDELETE/S, FOOVR=FORCEOVERWRITE/S,DONTOVR=DONTOVERWRITE/S,FORCE/S
FROM - files or directory to copy. TO - destination path-name or file PATTERN - when FROM is a directory, only files matching this pattern will be copied. BUFFER - size of the buffer (multiple of 512 bytes)to use during the copy ALL - includes sub-directories if FROM is a directory DIRECT - copy file without any tests or options CLONE - keeps timestamp, comments, and protec. bits of the FROM file. DATES - the timestamp of the FROM file is copied to the TO file. NOPRO - The protection bits of the FROM file are not copied to the TO file. The TO file is given standard protection bits or r, w, e, and d. PROX - only copy X,S,P protection bits COMMENT - the comments of the FROM file are copied to the TO file. QUIET - suppresses output messages/errors and requesters. NOREQ - errors such as disk full, or assign not existing will cause the display of a requester. Using this switch will remove them. ERRWARN - do not proceed when one file failed. MAKEDIR - produce directories. MOVE - delete source files after the copying successful. DELETE - do not copy but delete the source files. HARD - make a hardlink to source instead of copying. SOFT - make a sourcelink to source instead of copying. FOLNK - also makes links to directories. FODEL - delete protected files as well. FOOVR - also overwrites protected files. DONTOVR - do not overwrite files if they already exist FORCE - DEPRECIATED: if files already exist and are write-protected, this option will force them to be overwritten
Copy copies the file or directory specified with the FROM argument to the file or directory specified by the TO argument. You can copy several items at once by giving more than one name/pattern in the FROM argument; they should be separated by spaces. If the FROM argument is a pattern or consists of multiple names, the TO argument must be a directory. If a TO file name already exists, Copy overwrites the TO file with the FROM file. You can use a pair of double quotation marks ("") to refer to the current directory. When used as the FROM argument, "" copies all the files in the current directory. Do not put any spaces between the double quotation marks.