A previous page discussed the Recovery Console and the commands that are available. In this article are some additional details about the commands.
- Attrib
- Changes the attributes of a file or directory. Has different parameters from the standard command prompt. The syntax is:
attrib [+r|-r] [+s|-s] [+h|-h] [+c|-c] [[drive:][path] filename]
The switches are described in the table below:
Switch Function r Controls"read-only" attribute s Controls"system" attribute h Controls "hidden" attribute c Controls compressed file attribute - Batch
- Executes the commands specified in a text file. If desired, the results can be sent to an output file. Not available except when using the Recovery Console. The Syntax is:
batch input_file.txt [output_file]
- Bootcfg
- Used to configure boot file boot.ini. Has different parameters from the standard command prompt. Syntax is:
bootcfg /parameter
The possible parameters are given in the table below.
Parameter Function add Add a Windows installation to the boot list copy Back up boot.ini default Choose the default boot entry disableredirect Disable redirection in the boot loader list List the current entries in the boot list rebuild Iterate through all Windows installations redirect Enable redirection in the boot loader scan Scan all disks for Windows installations - CD (Chdir)
- Displays the name of the current directory or changes the current directory. No switches. Behaves somewhat differently from command prompt.
- Chkdsk
- Checks a disk and displays a status report. Has different parameters from the standard command prompt. Syntax is:
chkdsk [drive:] [/p] [/r]
The switch /p makes an exhaustive check of a drive without making changes. The switch /r makes the same check but also recovers readable information. (Note that there are erroneous entries on the Internet that suggest using switches that are only available in the regular command prompt.) - Cls
- Clears the screen. Has same function as in the command prompt.
- Copy
- Copies a single file to another location. Lacks the switches present in the command prompt.
- Del
- Deletes a single file. Lacks the switches present in the command prompt.
- Dir
- Displays a list of the files and subdirectories in a directory. Lacks the switches present in the command prompt.
- Disable
- Disables a system service or a device driver. The command is only available when you are using the Recovery Console. The syntax is:
disable {[service_name] | [device_driver_name]}
- Diskpart
- Creates and deletes partitions on a hard drive. The command is different from the very restricted version available in a normal command prompt. The syntax is:
diskpart [/add | /delete] [device_name | drive_name | partition_name] [size]
- Enable
- Starts or enables a system service or a device driver. The command is only available when you are using the Recovery Console. The syntax is:
enable {service_name | device_driver_name} [startup_type]
- Exit
- Exits the Recovery Console and restarts your computer.
- Expand
- Extracts a file from a compressed file. Has switches that differ from the command prompt version. The syntax is:
expand source [/F:filename}] [destination] [/d] [/y]
The switch /F:filename allows you to extract a single file indicated by filename. To list the files contained in a cabinet file without extracting them, use the switch /d. The switch /y suppresses prompts when over-writing a file with an extracted file. - Fixboot
- Writes a new partition boot sector to the system partition. The fixboot command is only available when you are using the Recovery Console. Syntax is:
fixboot [drive]
- Fixmbr
- Repairs the master boot record of the specified disk. The fixmbr command is only available when you are using the Recovery Console. The syntax is:
fixmbr [device_name]
If you do not specify a device_name, a new master boot record will be written to the boot device, which is the drive on which your primary system is loaded. - Format
- Formats the specified drive to the specified file system. The syntax is:
format [drive:] [/q] [/fs:file-system]
The switch /q enables a quick format. The switch /fs: allows a choice of file system. - Help
- Displays a list of the commands you can use in the Recovery Console.
- Listsvc
- Lists the services and drivers available on the computer. Only available when you are using the Recovery Console.
- Logon
- Logs on to a Windows installation. Only available when you are using the Recovery Console.
- Map
- Displays the drive letter mappings. Only available when you are using the Recovery Console.
- Md (mkdir)
- Creates a directory or subdirectory.
- More
- Displays a text file.
- Net use
- Connects a network share to a drive letter. The net use command with different parameters is available from the command prompt.
- Rd (rmdir)
- Removes (deletes) a directory. Lacks the switches available in the command prompt.
- Ren (rename)
- Changes the name of a single file.
- Set
- Displays and sets Recovery Console environment variables. Details are given on a previous page.
- Systemroot
- Sets the current directory to the systemroot folder of the Windows installation where you are logged on. Not available in the command prompt.
- Type
- Displays a text file.