Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: RESTORE.EXE
 Description
 Syntax
 Parameters
 Switches
 Related Command
 Remarks
  Checking restored files
  Limitations on RESTORE
  Compatibility with previous versions of BACKUP
  RESTORE exit codes
  Listing the names of backed-up files
  Restoring to different drives
 Examples

MS DOS Command: RESTORE.EXE

Reference from Microsoft MS-DOS cmd help

Description

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.

Remarks

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 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.

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.


©sideway

ID: 110700249 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019