attrib batch bootcfg cd chdir chkdsk cls copy del delete dir disable diskpart enable exit expand fixboot fixmbr format help listsvc logon map md mkdir more rd ren rename rmdir set systemroot type
|
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | attrib-|+[c][h][r][s] [drive:][path]filename | | | | Parameters: |
| Parameter |
Description |
| + |
Sets an attribute. |
| - |
Clears an attribute. |
| c |
Sets or clears a compressed file attribute. |
| h |
Sets or clears a hidden file attribute. |
| r |
Sets or clears a read-only file attribute. |
| s |
Sets or clears a system file attribute. |
| drive: |
Specifies the drive letter to use. |
| path: |
Specifies the directory path to use. |
| | | | Description: | Use the attrib command to change the file attributes for a single file or folder
You should also follow these guidelines when you use the attrib command:
- You must set or clear at least one attribute.
- You can change attributes for only one file or directory at a time.
- You can view attributes by using the dir command.
- Do not separate attribute parameters with spaces.
- You can set multiple attributes simultaneously.
- To change multiple attributes in the same way, use either the set or clear parameter (+ or -).
Include all the attribute options to be changed, and do not separate them with spaces.
For example, to set the compressed, hidden, and read-only attributes for a single file, type the following:
attrib +chr filename
- To change multiple attributes in different ways, use the set parameter (+) and include all the attribute
letters to be set, followed without a space by the clear parameter (-) and all the attribute letters to be cleared.
For example, to set the compressed and hidden file attributes and to clear the read-only file attribute, type:
attrib +ch-r filename
| | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | cd [path]|[..]|[drive:] | | | | Parameters: |
| Parameter |
Description |
| path |
Specifies the directory that you want to change to. |
| .. |
Displays the parent folder. |
| drive: |
Specifies the drive that you want to change to. |
| | | | Description: | Use the cd or chdir command to display the name of the current volume or directory, or to change to the folder specified. The chdir command only operates within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. If you want to display the current volume and folder, use the cd or chdir command without parameters. These commands treat spaces as delimiters, which require that a space is inserted before all arguments, including double periods. Use quotation marks to enclose a path or file name that contains a space. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | chdir [path]|[..]|[drive:] | | | | Parameters: |
| Parameter |
Description |
| path |
Specifies the directory that you want to change to. |
| .. |
Displays the parent folder. |
| drive: |
Specifies the drive that you want to change to. |
| | | | Description: | Use the cd or chdir command to display the name of the current volume or directory, or to change to the folder specified. The chdir command only operates within the system directories of the current Windows installation, removable media, the root directory of any hard disk partition, or the local installation sources. If you want to display the current volume and folder, use the cd or chdir command without parameters. These commands treat spaces as delimiters, which require that a space is inserted before all arguments, including double periods. Use quotation marks to enclose a path or file name that contains a space. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | chkdsk [drive:] [/p]|[/r] | | | | Parameters: |
| Parameter |
Description |
| drive: |
Specifies the volume that you want chkdsk to check. |
| /p |
Performs an exhaustive volume check. This parameter does not make any changes to the volume. |
| /r |
Locates bad sectors and recovers readable information before marking them as unusable. Implies /p. |
| | | | Description: | Use the chkdsk command to check a volume, and if needed, to repair the volume. Also, use chkdsk to recover and move readable information before marking bad sectors as unusable. You can use the chkdsk command without parameters. When you do not specify a volume, chkdsk runs on the current volume. Chkdsk requires the file Autochk.exe. If chkdsk cannot find Autochk.exe in the systemroot\System32 directory, it attempts to locate Autochk.exe on the Windows Server 2003 installation CD. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | dir [drive:][path][filename] | | | | Parameters: |
| Parameter |
Description |
| drive: |
Specifies the volume of the directory for which you want a listing. |
| path |
Specifies the directory for which you want a listing. |
| filename |
Specifies the file for which you want a listing. |
| | | | Description: | Use the dir command to display a list of the files and folders in a directory and to specify a particular file or group of files for which you want to see a listing. Multiple file names can be used. File names can be separated by spaces, commas, or semicolons. You can use wildcard characters (? and *) in the filename parameter to display a group of files.
Dir also lists the disk’s volume label and serial number, and the total number of files listed, their cumulative size, and the free space (in bytes) remaining on the disk. For each file and subdirectory, dir lists the file name extension, the file size in bytes, the date and time the file was last modified, and the following file attributes, if applicable.
In Recovery Console, the dir command functions differently that the command line because it lists all folders and files, including those with hidden and system attributes set. For each file and subdirectory, the dir command lists its attributes (if they apply) by using the following abbreviations:
- a = Archive
- c = Compressed
- d = Directory
- e = Encrypted
- h = Hidden
- p = Reparse point
- r = Read-only
- s = System file
| | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | disable servicename | | | | Parameters: |
| Parameter |
Description |
| servicename |
Specifies the service or driver that you want to disable. |
| | | | Description: | Use the disable command to disable a service or driver.
Use a related command, listsvc, to view a list of service and driver names for your system. The disable command displays the previous start type of the service before changing it to SERVICE_DISABLED. Record this value so that you can restore the original state of the service after troubleshooting a problem.
There are five startup types. The first three, SERVICE_AUTO_START, SERVICE_DISABLED, and SERVICE_DEMAND_START, correspond to the standard startup types, Automatic, Disabled, and Manual, which you typically configure using the Services snap-in in the Computer Management administrative tool. The last two, SERVICE_BOOT_START and SERVICE_SYSTEM_START, are commonly used to configure the way device drivers load, for example, when Windows starts. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | diskpart [/add|/delete] [device-name|drive-name|partition-name] [size] | | | | Parameters: |
| Parameter |
Description |
| /add |
Creates a new disk partition. |
| /delete |
Deletes an existing partition. |
| device-name |
Specifies the name of the device for which you want to create or delete a partition, for example, \Device\HardDisk0. To obtain the name of a device, view the output of the map command. |
| drive-name |
Specifies the drive letter of the partition that you want to delete, for example, D:. Use only with /delete. |
| partition-name |
Specifies the partition that you want to delete and can be used in place of the drive-name parameter. For example,\Device\HardDisk0. Use only with /delete. |
| size |
Specifies the size, in megabytes, of the partition you want to create. Use only with /add. |
| | | | Description: | Use the diskpart command to manage the partitions on your hard disk. For example, you can use diskpart to create or delete disk partitions.
If you do not use a parameter, a user interface for managing your partitions appears.
This command can damage your partition table if the disk has been upgraded to a dynamic disk. Do not modify the structure of dynamic disks unless you are using the Disk Management snap-in. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | enable servicename [start_type] | | | | Parameters: |
| Parameter |
Description |
| servicename |
Specifies the service or driver that you want to enable. |
| start_type |
Specifies the startup type for a service or driver. Valid values are:
- SERVICE_BOOT_START
- SERVICE_SYSTEM_START
- SERVICE_AUTO_START
- SERVICE_DEMAND_START
|
| | | | Description: | Use the enable command to enable or change the startup type of a service or driver.
Use the related command, listsvc, to view a list of service and driver names for your system. The enable command displays the previous start type of the service before changing it. Record this value so that you can restore the original state of the service after troubleshooting a problem.
If you do not specify a new start type, the enable command displays the previous start type. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | fixmbr [device-name] | | | | Parameters: |
| Parameter |
Description |
| device-name |
Specifies the name of the device that needs a new MBR, for example, \Device\HardDisk1. |
| | | | Description: | Use the fixmbr command to rewrite the master boot code of the master boot record (MBR) of the startup hard disk. This command is useful for repairing corrupted MBRs.
If you do not specify a device, the default is disk 0. If disk 0 is not the device that needs repairing, you can obtain the device name of other disks by using the map command.
If the fixmbr command detects an invalid or nonstandard partition table signature, it prompts you for permission before rewriting the MBR.
Use this command with care because it can damage your partition table if any of the following applies:
- A virus is present and a non-Microsoft operating system is installed on the same computer.
- A nonstandard MBR is installed by a non-Microsoft disk utility.
- A hardware problem exists.
Always run antivirus software before using this command.
When you run the fixmbr command, it only overwrites the master boot code and leaves the existing partition table intact. If corruption in the MBR affects the partition table, running the fixmbr command might not resolve the problem. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | help [command] | | | | Parameters: |
| Parameter |
Description |
| Command |
Specifies the drive letter for the volume you want to format. |
| | | | Description: | Use the help command to view Help information for Recovery Console commands.
Use the command parameter to specify a name of any Recovery Console command.
If you do not specify a parameter, Help lists information about all the supported commands. | | | | More Info: | Microsoft |
| Desktop Platforms: | |  | | Server Platforms: | | | | | | | Syntax: | map [arc] | | | | Parameters: |
| Parameter |
Description |
| Arc |
Use the arc parameter to force the use of the Advanced RISC Computing (ARC) specification format to describe paths instead of using device paths. You can use this information to create or repair the Boot.ini file. |
| | | | Description: | Use the map command to list all drive letters, file system types, volume sizes, and mappings to physical devices that are currently active.
If you do not use the arc parameter, the map command displays device names. The map command also displays the type of file system and the size of each disk in megabytes (MB).
The map command might not work correctly with systems that are using dynamic disk features. | | | | More Info: | Microsoft |
|
|