home *** CD-ROM | disk | FTP | other *** search
- ----------------------- BACKUP - External DOS Command ------------------------
-
- BACKUP makes backup copies of one or more files from a fixed disk to diskettes.
- The backup files are stored in a special DOS BACKUP format and can be
- retrieved only with the RESTORE command.
-
- FORMAT: BACKUP [d1:][path][filename[.ext]] d2:[/S][/M][/A][/D:mm-dd-yy]
-
- REMARKS:
-
- d1 - the drive letter of the fixed disk. If omitted, the default drive
- is assumed.
- path - the directory path of the directory whose files are to be backed
- up. If omitted, the current directory is assumed.
- filename - the filename of the files to be backed up. Global characters
- (* and ?) are allowed.
- .ext - the filename extension of the files to be backed up. Global
- characters (* and ?) are allowed.
- d2 - the drive letter of the diskette drive which will receive the back
- ups.
- /S - causes files in all subdirectories of the specified directory
- (specified in "path"), in addition to the specified directory, to
- be backed up. This includes all levels of subdirectories beyond
- the specified directory.
- /M - specifies that only those files that have been modified or created
- since the last backup are to be backed up.
- /A - specifies that backed up files are to be added to the files
- already on the diskette in the backup drive. You will not be
- prompted to insert a diskette in the backup drive when this
- parameter is specified.
- /D:mm-dd-yy - specifies that only files created or modified on or after the
- date given in mm-dd-yy are to be backed up.
-
- If you do not use the /A parameter, DOS will prompt you to insert a backup
- diskette. All files already on the disk will be erased before the back up
- occurs. When a diskette is full, you will be prompted to insert the next
- backup diskette. You should record the backup diskette number and the date
- of backup on the external label of the diskette.
-
- You must use DOS formatted diskettes only.
-
- BACKUP displays each file's name as it is backed up. You can use
- "redirection" to direct the display to the printer or to a file (see examples
- below).
-
- Backup files created with BACKUP are usable only by the RESTORE command. Use
- RESTORE to restore a file that was backed up with the BACKUP command.
-
- When BACKUP completes, it sets an exit code. These exit codes can be tested
- in an IF Batch Subcommand in a batch file. The ERRORLEVEL variable will be
- set to one of the following the exit codes:
-
- 0 = Normal Completion
- 1 = No files to be backed up were found
- 3 = Backup terminated by user (with Ctrl-Break)
- 4 = Backup terminated due to error
-
-
- WARNING: All files on the diskettes to receive the backups are erased before
- the backup occurs (unless the /A parameter is specified).
-
-
- EXAMPLES:
-
- Back up all files on fixed disk drive C to diskette drive A:
-
- BACKUP C:\ A:/S
-
-
- Back up all files on fixed disk drive C that have been created or modified since
- the last backup to diskette in drive A:
-
- BACKUP C:\ A:/S/M
-
-
- Back up all files on fixed disk drive C that have been created or modified since
- the last backup to diskette in drive A. The files are to be added to the files
- already on the drive A diskette:
-
- BACKUP C:\ A:/S/M/A
-
-
- Back up all files on fixed disk drive C that have been created or modified since
- April 5, 1985 to diskette in drive A:
-
- BACKUP C:\ A:/S/D:04-05-85
-
-
- Back up all files in the directory BUDGET of drive C that have a filename
- extension of .DAT. The BUDGET directory is a subdirectory of the root level.
- The files are to be backed up to diskette in drive A:
-
- BACKUP C:\BUDGET\*.DAT A: