Restores to standard disk storage format files
previously stored using the BACKUP command. The DOS 6 RESTORE command
can restore files that were backed up using the BACKUP command in DOS
Versions 2.0 through 5.0.
Discussion
When using this command, the first path designation should be for the
BACKUP disk where the backed up files are stored; the second path
designation should be for the target disk. This command transfers
files (that have been previously backed up using the BACKUP command)
from the backup disk to the specified target disk. Files backed up
using the BACKUP command cannot be read (or otherwise used) until they
are transferred from the BACKUP disk to the target disk. If you do not
specify a target path, files are placed in the current directory. If
you do not specify filenames, backed up files from the specified path
designation will be restored. You can use wild card characters to
indicate groups of files to be restored.
Options
/P The program prompts you before it restores
files that have been changed since the last backup or files that are
marked read-only. You can choose to continue the restoration of that
file or not.
/S Backed up files from both the specified
source directory and from subdirectories within that directory are
transferred to the target path designation.
/B Only restores files that were modified on
or BEFORE the date you enter.
/A Only restores files that were modified on
or AFTER the date you enter.
/E Only restores files that were modified
at or EARLIER than the time you enter.
/L Only restores files that were modified at
or LATER than the given time.
/M Only restores files that have been
modified since the last backup.
/N Only restores files that no longer exist
on the destination disk.
/D Displays a list of the files on the
backup disk that match the names specified in filename without
restoring any files. Even though no files are being restored,
you must specify the drive to which backed-up files will be restored
when you use /D.
ERRORLEVEL codes are set by the RESTORE command as follows:
0 Normal completion 1 No files found to restore 2 Some files not restored due to
file sharing conflicts 3 Terminated by user
(Ctrl Break or ESC) 4 Terminated due to error
Examples
To restore all the files from drive B to the root directory of drive C
(and all subdirectories within it), enter
restore b: c:*.* /S
To restore the file ANNUAL86 from the backup disk in drive A to the
FILES directory on drive C, enter
restore a: c:\file\annual86
For more information about this command, refer to the downloadable book DOS the Easy Way.