------------------------ MS-DOS v6.22 Help: RESTORE ------------------------
<Notes> <Examples>                                               <Index>
----------------------------------------------------------------------------

                                  RESTORE

Restores files that were backed up by using any version of BACKUP from
MS-DOS versions 2.0 through 5.0. If you are restoring files that were backed
up using the MSBACKUP program in MS-DOS 6 or later, use that version of the
<MSBACKUP> program to restore those files.

You can restore files from similar or dissimilar disk types.

Syntax

    RESTORE drive1: drive2:[path[filename]] [/S] [/P] [/B:date] [/A:date]
    [/E:time] [/L:time] [/M] [/N] [/D]

Parameters

drive1:
    Specifies the drive on which the backed-up files are stored.

drive2:
    Specifies the drive to which the backed-up files will be restored.

path
    Specifies the directory to which the backed-up files will be restored.
    You must specify the same directory from which the files were backed
    up.

filename
    Specifies the names of the backed-up files you want to restore.

Switches

/S
    Restores all subdirectories.

/P
    Prompts you for permission to restore files that are read-only (that
    have the read-only attribute set) or that have changed since the last
    backup (that have the archive attribute set).

/B:date
    Restores only those files last modified on or before the specified date.
    The format of date varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying date, see the <DATE>
    command.

/A:date
    Restores only those files last modified on or after the specified date.
    The format of date varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying date, see the <DATE>
    command.

/E:time
    Restores only those files last modified at or earlier than the specified
    time. The format of time varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying time, see the <TIME>
    command.

/L:time
    Restores only those files last modified at or later than the specified
    time. The format of time varies according to the COUNTRY setting in your
    CONFIG.SYS file. For information about specifying time, see the <TIME>
    command.

/M
    Restores only those files modified since the last backup.

/N
    Restores only those 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 drive2 when you use /D.

Related Command

For information about backing up files, see the <MSBACKUP> command.

                                      ***

<Syntax> <Examples>
----------------------------------------------------------------------------

                               RESTORE--Notes

Checking restored files

Once a file has been restored, you can use the DIR or TYPE command to make
sure the file was restored properly.

Limitations on RESTORE

You cannot use the RESTORE command to restore system files (IO.SYS and
MSDOS.SYS). RESTORE does not work with drives that have been redirected with
the ASSIGN or JOIN command.

Compatibility with previous versions of BACKUP

The MS-DOS 6.22 RESTORE command can restore files that were backed up by
using the BACKUP command in MS-DOS versions 2.0 through 5.0.

RESTORE exit codes

The following list shows each exit code and a brief description of its
meaning:

0
    RESTORE successfully restored the file or files.

1
    RESTORE could not find the files to restore.

3
    The user pressed CTRL+C to stop the restoring operation.

4
    RESTORE stopped because of an error.

You can use the ERRORLEVEL parameter on the IF command line in a batch
program to process exit codes returned by RESTORE.

For an example of a batch program that processes exit codes, see the <IF>
command or the <CHOICE> command.

Listing the names of backed-up files

Use the /D switch to see a list of the backed up files. If you specify
filename with the /D switch, RESTORE displays a list of the backed up files
that match the name you specify. If you use the /D switch, RESTORE does not
restore any files.

Restoring to different drives

While you must restore files to their original directory, you can restore
them to a different drive. For example, files backed up from the
C:\MYFILES\*.* directory can be restored to the D:\MYFILES\*.* directory.

                                      ***

<Syntax> <Notes>
----------------------------------------------------------------------------

                             RESTORE--Examples

To restore the file INVEST.MNT from the backup disk in drive A to the IRS

directory on drive C, type the following command:

    restore a: c:\irs\invest.mnt

MS-DOS prompts you to insert the backup disk into drive A. Once the backup
disk is in drive A, press ENTER to continue.

Suppose you backed up all of the files in the directory \USER\ADAMS on drive
C. To restore these files, insert the backup disk in drive A and type the
following command:

    restore a: c:\user\adams\*.*

It is important that you specify *.* for filename. Otherwise, the RESTORE
command attempts to restore a file named ADAMS in the USER directory.

To restore a complete hard disk from a backup disk (or disks) in drive A,
type the following command:

    restore a: c:\*.* /s

The /S switch and the wildcards (*.*) specify that RESTORE is to restore all
backed-up files to their original directories and subdirectories on drive
C.

                                      ***

----------------------------------------------------------------------------
<Top of page>
Last update: December 07, 2002 14:45 by
Content © 1997 Microsoft Corporation
All else © 2000-2005
Counter