Freedisk command in Windows

The freedisk command checks to see if the amount of designated disk space is available before deciding whether to continue the installation process.

Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.

The freedisk command checks to see if the amount of designated disk space is available before deciding whether to continue the installation process.

Syntax of freedisk command

 freedisk [/s [/u [] [/p []]]] [/d ] [] 

Parameters

Parameter Description / s Specifies the name or IP address of the remote computer (do not use a backslash). The default is the local computer. This parameter applies to all files and directories specified in the command. / u [] Run the script with the rights of the specified user account. The default is system permissions. / p [] Specifies the password of the user account specified in the / u parameter. / d Specify the drive on which you want to find how much free space is available. You must specify for a remote computer. Check the amount of disk space available. You can specify in bytes, KB, MB, GB, TB, PB, EB, ZB or YB.

Note

  1. Use the command line options / s, / u and / p are only available, when you use / s. You must use / p with / u to provide the user's password.
  2. To install unattended, you can use the freedisk command in the batch files installed to check the amount of available disk space before continuing with the installation.
  3. When you use the freedisk command in a batch file, it returns 0 if there is enough space and 1 if there is not enough space.

For example

To determine if there is at least 50 MB of free space available on drive C :, type:

 freedisk 50mb 

The output similar to the following will appear on the screen:

 INFO: The specified 52,428,800 byte(s) of free space is available on current drive. 

See more:

  1. Fondue command in Windows
  2. Findstr command in Windows
  3. The flattemp command in Windows
5 ★ | 1 Vote