Format command parameter Description _dos/bat

Source: Internet
Author: User

Formatting
Formats the disks in the specified volume to accept Windows files.

Grammar
Format volume [/fs:file-system] [/v:label] [/q] [/a:unitsize] [/c] [/x]

Format volume [/v:label] [/q] [/f:size]

Format volume [/v:label] [/q] [/t:tracks/n:sectors]

Format volume [/v:label] [/q]

Format volume [/q]

Parameters
Volume
Specifies the mount point, volume name, or drive letter of the drive to be formatted. If you do not specify any of the following command-line options, format uses the volume type to determine the default format for the disk.
/fs:file-system
Specifies the file system you want to use: FAT, FAT32, or NTFS. Floppy disks can only use the FAT file system.
/v:label
Specifies the volume label. If you omit the/V command-line option or use it without specifying a volume label, format prompts you to enter the volume label after the format is complete. Use syntax/V: To prevent prompt input of volume labels. If you format multiple disks using a format command, all disks are assigned the same volume label. For more information about disk volume labels, click Dir, Label, and Vol in the list.
/a:unitsize
Specifies the allocation unit size to be used on FAT, FAT32, or NTFS volumes. If UnitSize is not specified, the size of the volume is selected. The following table lists the valid values for UnitSize. Value Description
512 per cluster 512 bytes.
1024 per cluster 1024 bytes.
2048 per cluster 2048 bytes.
4096 per cluster 4096 bytes.
8192 per cluster 8192 bytes.
16K per cluster 16K bytes.
32K per cluster 32K bytes.
64K per cluster 64K bytes.

/q
Performs a quick format. Deletes the file table and root directory of the previously formatted volume, but does not scan the damaged area between sectors. Use the/q command-line option to format only the intact volumes that were previously formatted.
/f:size
Specifies the size of the floppy disk to be formatted. If possible, use this command-line option to replace the/T and/n command-line Options. Windows accepts values of the following size:
1440 or 1440k or 1440kb or 1.44 or 1.44m or 1.44MB
1.44-MB, double-sided, four times times the density of 3.5-inch disk.

/t:tracks
Specifies the number of tracks on the disk. Use the/F command-line option as much as possible in place of the command line option. If you use the/t command-line option, you must also use the/n command-line option. These two command-line items provide another way to specify the size of a formatted disk. You cannot use the/F command-line option with the/t command line option.
/n:sector
Specifies the number of sectors on each track. Use the/F command-line option as much as possible in place of the command line option. If you use the/n command-line option, you must also use the/t command-line option. These two command-line items provide another way to specify the size of a formatted disk. You cannot use the/F command-line option with the/n command line option.
/C
is limited to NTFS only. By default, files created on new volumes are compressed.
/x
If necessary, dismount the volume before formatting. Any open handles to the volume are no longer valid.
/?
Display Help at the command prompt.
Comments
Use format in the Recovery Console.
The format command can be used with various parameters from the Recovery Console.

Administrative privileges
You must be a member of the Administrators group to format your hard disk.

Use format
The Format command creates a new root directory and file system for the disk. You can also check the damaged zone on the disk, and it can delete all data on the disk. To be able to use a new disk, you must first format the disk with this command.

Type the volume label
When you format a floppy disk, format displays the following information:

Volume label (one characters, ENTER for none)?

The volume label can contain up to 11 characters (including spaces). If you do not need a disk volume label, press ENTER. For information about the volume label, click the label in the list.

Format the hard drive
When you format a hard disk using the format command, format displays a message in the following format before the hard disk is formatted:

WARNING, all DATA on nonremovable DISK
DRIVE X:will be lost!
Proceed with Format (y/n)? _

To format the hard disk, press the Y key, or press N if you do not need to format the hard disk. You must have administrator privileges to format the hard drive.

Unit size
The FAT file system limits the number of magnetic races to no more than 65526. The FAT32 file system restricts the number of magnetic races from 65527 to 4177917.

NTFS compression is not supported for allocation unit sizes greater than 4096.

The format message.
After the format is complete, format displays messages for total disk space, space marked as error, and space available for the file.

Quick Format
The format process can be accelerated by the/q command-line option. You can use this command-line option only if there are no bad sectors on your hard disk.

Use format for reassigned drives or network drives
You should not use the Format command on a drive that is prepared by using the subst command. You cannot format disks over the network.

Format Exit code
The following table lists each exit code and a brief description of its meaning:

Exit code Description
0 format operation succeeded.
1 provides incorrect parameters.
4 Fatal error (any error other than 0, 1, or 5) occurs.
5 user presses N key to respond prompt "Proceed with Format (y/n)?" To stop the process.

You can check these exit codes by using the ERRORLEVEL condition and the IF batch command.

Example
To format a new floppy disk in drive A using the default size, type:

Format A:

To perform a quick format operation on a previously formatted disk in drive A, type:

Format a:/q

To format the floppy disk in drive A and specify that its volume label is "DATA", type the following command:

Format A:/v:data

XOX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.