FREEDISK – Windows CMD Command

Checks to see if a specified amount of disk space is available.

Syntax
      FREEDISK [/s Computer [/u [Domain\]User [/p [Password]]]] [/d Drive] [Value]

Key
   /s Computer       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  Run the script with the permissions of the specified user account.
                     The default is system permissions.

   /p [Password]     The password of the user account that is specified in /u.
   /d Drive          The drive for which you want to find out the availability of free space.
                     You must specify Drive for a remote computer.

   Value             Check for a specific amount of free disk space.
                     specify Value in bytes, KB, MB, GB, TB, PB, EB, ZB or YB.

When used in a batch file, freedisk returns errorlevel=0 if there is enough space and errorlevel=1 if there is not enough space.

For unattended installations, you can use FREEDISK in installation batch files to check for a prerequisite amount of free space before continuing with the installation.

Example

Determine if there is at least 50 MB of free space on drive C:

freedisk 50mb

You may also like...

2 Responses

  1. froleprotrem says:

    Hello my friend! I want to say that this article is awesome, nice written and include approximately all vital infos. I’d like to see more posts like this.

  2. Oscar Lamens says:

    i like this recommended post

Leave a Reply

Your email address will not be published. Required fields are marked *