Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the format command

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "how to use the format command", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the format command" this article.

Formatting

Formats the disk 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 format. If you do not specify any of the following command line options, format uses the volume type to determine the default format of the disk.

/ fs:file-system

Specify the file system to use: FAT, FAT32, or NTFS. Floppy disks can only use the FAT file system.

/ v:label

Specify the volume label. If you omit the / v command line option or use it without specifying a volume label, format prompts for a volume label after formatting is complete. Use the syntax / v: to prevent prompts for volume labels. If multiple disks are formatted with a single format command, the same volume label is assigned to all disks. For more information about disk volume labels, click Dir, Label, and Vol in the list.

/ a:UnitSize

Specifies the size of the allocation unit to be used on FAT, FAT32, or NTFS volumes. "if no UnitSize is specified, the selection is based on the size of the volume." The following table lists the valid values for UnitSize. Value description

512 512 bytes per cluster.

1024 1024 bytes per cluster.

2048 2048 bytes per cluster.

4096 4096 bytes per cluster.

8192 8192 bytes per cluster.

16K bytes per cluster.

32K bytes per cluster.

64K bytes per cluster.

/ q

Perform a quick format. Delete the file table and root directory of the previously formatted volume, but do not scan for corrupted areas between sectors. Using the / Q command line option should format only previously formatted intact volumes.

/ f:size

Specifies the size of the floppy disk to format. If possible, use this command line option instead of 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, quadruple-density 3.5in disk.

/ t:tracks

Specifies the number of tracks on the disk. Use the / f command line option instead of the command line option whenever possible. 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 the 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 instead of the command line option whenever possible. 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 the formatted disk. You cannot use the / f command line option with the / n command line option.

/ c

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.

/?

Displays help at the command prompt.

Annotation

Use format in the recovery console.

The format command can be used from the recovery console with various parameters.

Administrative privilege

You must be a member of the Administrators group to format the hard drive.

Use format

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

Type the volume label

After formatting the floppy disk, format displays the following information:

Volume label (11 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 volume labels, click label in the "" list.

Format the hard disk

When using the format command to format the hard drive, format displays messages in the following format before formatting the hard drive:

WARNING, ALL DATA ON nonremovable DISK

DRIVE x:WILL BE LOST!

Proceed with Format (Y _ hand N)? _

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

Unit size

The FAT file system limits the number of magnetic families to 65526. The FAT32 file system limits the number of magnetic families to between 65527 and 4177917.

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

Format message.

After the formatting is complete, Format displays a message about the total disk space, the space marked as error, and the space available to the file.

Quick formatting

The formatting process can be accelerated with the / Q command line option. This command line option can only be used if there are no bad sectors on the hard drive.

Use format for reassigned or network drives

The format command should not be used on drives prepared by using the subst command. Disk cannot be formatted over the network.

Format exit code

The following table lists a short description of each exit code and its meaning:

Exit code description

The 0 format operation was successful.

1 provides incorrect parameters.

4 A fatal error (any error other than 0, 1, or 5) occurred.

5. If the user presses the N key, he / she will respond to the prompt "Proceed with Format." To stop the process.

You can examine these exit codes by using the errorlevel condition and the if batch command.

Example

To format the new floppy disk in drive A with 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 An and specify that its volume is labeled "DATA", type:

Format a:/v:DATA

XOX

The above is all the contents of this article "how to use format commands". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report