text
stringlengths
0
4.23k
You shouldn't use the format command on a drive that was prepared by using the subst command. You can't format disks over a network.
The following table lists each exit code and a brief description of its meaning.
Exit code
Description
0
The format operation was successful.
1
Incorrect parameters were supplied.
4
A fatal error occurred (which is any error other than 0, 1, or 5).
5
The user pressed N in response to the prompt "Proceed with Format (Y/N)?" to stop the process.
You can check these exit codes by using the ERRORLEVEL environment variable with the if batch command.
Examples
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 floppy disk in drive A, type:
format a: /q
To format a floppy disk in drive A and assign it the volume label DATA, type:
format a: /v:DATA
freedisk
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Checks to see if the specified amount of disk space is available before continuing with an installation process.
Syntax
freedisk [/s <computer> [/u [<domain>\]<user> [/p [<password>]]]] [/d <drive>] [<value>]
Parameters
Parameter
Description
/s <computer>
Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer. This parameter applies to all files and folders specified in the command.
/u [<domain>\]<user>
Runs the script with the permissions of the specified user account. The default is system permissions.
/p [<password>]
Specifies the password of the user account that is specified in /u.
/d <drive>
Specifies the drive for which you want to find out the availability of free space. You must specify <drive> for a remote computer.
<value>
Checks for a specific amount of free disk space. You can specify <value> in bytes, KB, MB, GB, TB, PB, EB, ZB, or YB.
<computer>
<domain>
<user>
<password>
<drive>
<drive>
<value>
<value>
Remarks
Using the /s, /u, and /p command-line options are available only when you use /s. You must use /p with /uto provide the user's password.
For unattended installations, you can use freedisk in installation batch files to check for the prerequisite amount free space before continuing with the installation.
When you use freedisk in a batch file, it returns a 0 if there's enough space and a 1 if there's not enough space.
Examples
To determine whether there are at least 50 MB of free space available on drive C, type:
freedisk 50mb
Output similar to the following example appears on the screen:
INFO: The specified 52,428,800 byte(s) of free space is available on current drive.
fsutil 8dot3name
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8
Queries or changes the settings for short name (8dot3 name) behavior, which includes:
Querying the current setting for the short name behavior.
Scanning the specified directory path for registry keys that might be impacted if short names were stripped from the specified directory path.
Changing the setting that controls the short name behavior. This setting can be applied to a specified volume or to the default volume setting.
Removing the short names for all files within a directory.
Important
Permanently removing 8dot3 file names and not modifying registry keys that point to the 8dot3 file names may lead to unexpected application failures, including the inability to uninstall an application. It is recommended you first back up your directory or volume before you attempt to remove 8dot3 file names.
Syntax
fsutil 8dot3name [query] [<volumepath>]