home *** CD-ROM | disk | FTP | other *** search
- cp (local) Disk Utilities v1.1 cp (local)
-
- NNAAMMEE
- cp - This program is used to copy files. It supports
- recursion and copying files to multiple floppies.
-
-
- SSYYNNOOPPSSIISS
- cp [-abdmnprsu] [pattern ...] <file> [file ...] <dest>
-
-
- EENNVVIIRROONNMMEENNTTSS
-
- Options for this program will also be looked for in
- command.com's environment. This is done with the set command
- (e.g. set cp=n causes cp to always use the option n).
-
-
- OOPPTTIIOONNSS
-
- a - copy all files (includes hidden)
-
- b - Only copy the file if it's archive bit is set.
-
- d - don't copy date of file, replace all dates with current.
- This also makes the copy a little faster.
-
- m - media, if out of disk space, ask for other floppy. When
- there is no room left on the floppy the program will ask for
- another disk. When the new disk is inserted, cp will make all
- the necesary directories and continue copying. Files are not
- split up between disks, thus this option is very limited for
- backing up.
-
- n - no overwrite, if file exists don't copy. Any files which
- already exist will be skipped and not copied.
-
- p - pattern, copy only files matching the specified pattern.
- Multiple patterns can be specified with multiple p options (for
- example "-ppp *.c *.h *.bat" would copy all *.c *.h and *.bat
- files).
-
- r - recursive copy (copy all subdirectories and subfiles). This
- allows whole directory structures to be copied with a single
- command. For example : cp -r a:\*.* b:\ will copy everything on
- the a drive to the b drive.
-
- s - skip any files matching specified pattern. Multiple skip
- options can be included also, such as "-sss *.obj *.exe *.map"
-
- u - update. This causes copy to see if the source file also
- exists as the target. If this is the case, the source file will
- only be copied if it is more recent (i.e. has a newer date
- stamp). This can greatly increase the speed of simple one disk
- backups.
-
-
- EEXXAAMMPPLLEESS
-
- cp -r bin dos d:
- If bin and dos are files they are copied to d, if not then the
- directories are copied along with everything within the
- directories.
-
- -1-
-
- cp (local) Disk Utilities v1.1 cp (local)
-
- cp -n *.* d:\bin\foo
- Copies everything to d:\bin\foo except for files which already
- exist in d:\bin\foo
-
- cp -adm *.com b:
- Copies every file (including hidden) ending in .com to the b
- drive. If there is no room left on the b drive, the user will be
- asked for another disk.
-
- cp -russ *.exe *.obj *.* a:
- Copies all files and directories except the .exe and obj files.
- This can be very handy for quick backups.
-
- cp -rupps *.c *.h a*.* diskutil a:
- Copies all files ending with .c and .h but not starting with a to
- the A drive.
-
-
- BBUUGGSS
-
- None I know of!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -2-
- !
-