text stringlengths 0 4.23k |
|---|
This command is the command-line version of the NTFS file system compression feature. The compression state of a directory indicates whether files are automatically compressed when they are added to the directory. Setting the compression state of a directory does not necessarily change the compression state of files that are already in the directory. |
You can't use this command to read, write, or mount volumes compressed using DriveSpace or DoubleSpace. You also can't use this command to compress file allocation table (FAT) or FAT32 partitions. |
Examples |
To set the compression state of the current directory, its subdirectories, and existing files, type: |
compact /c /s |
To set the compression state of files and subdirectories within the current directory, without altering the compression state of the current directory itself, type: |
compact /c /s *.* |
To compress a volume, from the root directory of the volume, type: |
compact /c /i /s:\ |
Note |
This example sets the compression state of all directories (including the root directory on the volume) and compresses every file on the volume. The /i parameter prevents error messages from interrupting the compression process. |
To compress all files with the .bmp file name extension in the \tmp directory and all subdirectories of \tmp, without modifying the compressed attribute of the directories, type: |
compact /c /s:\tmp *.bmp |
To force complete compression of the file zebra.bmp, which was partially compressed during a system crash, type: |
compact /c /f zebra.bmp |
To remove the compressed attribute from the directory c:\tmp, without changing the compression state of any files in that directory, type: |
compact /u c:\tmp |
convert basic |
Converts an empty dynamic disk to a basic disk. A dynamic disk must be selected for this operation to succeed. Use the select disk command to select a dynamic disk and shift the focus to it. |
Important |
The disk must be empty to convert it to a basic disk. Back up your data, and then delete all partitions or volumes before converting the disk. |
Note |
For instructions regarding how to use this command, see Change a Dynamic Disk Back to a Basic Disk). |
Syntax |
convert basic [noerr] |
Parameters |
Parameter |
Description |
noerr |
For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code. |
Examples |
To convert the selected dynamic disk to basic, type: |
convert basic |
convert dynamic |
Converts a basic disk into a dynamic disk. A basic disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it. |
Note |
For instructions regarding how to use this command, see Change a Dynamic Disk Back to a Basic Disk). |
Syntax |
convert dynamic [noerr] |
Parameters |
Parameter |
Description |
noerr |
For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code. |
Remarks |
Examples |
To convert a basic disk into a dynamic disk, type: |
convert dynamic |
convert gpt |
Converts an empty basic disk with the master boot record (MBR) partition style into a basic disk with the GUID partition table (GPT) partition style. A basic MBR disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it. |
Important |
The disk must be empty to convert it to a basic disk. Back up your data, and then delete all partitions or volumes before converting the disk. The required minimum disk size for conversion to GPT is 128 megabytes. |
Note |
For instructions regarding how to use this command, see Change a Master Boot Record Disk into a GUID Partition Table Disk. |
Syntax |
convert gpt [noerr] |
Parameters |
Parameter |
Description |
noerr |
For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code. |
Examples |
To convert a basic disc from MBR partition style to GPT partition style, type: |
convert gpt |
convert mbr |
Converts an empty basic disk with the GUID Partition Table (GPT) partition style into a basic disk with the master boot record (MBR) partition style. A basic disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.