Please wait,
Processing your request...

  Business logo mourning
  ... | Selecteer de Nederlandse taal | Print this page. | Linkedin page of Johan van Soest | User: Guest | Login

Postcard image. Click this to mail to Johan


ICT-Hotlist Topic

Back to the ICT-Hotlist...
Don't miss latest updates Follow @WebHalla

Used-DiskSpace by

Current version

Used-DiskSpace latest version is and a .Net 4.x release can also be downloaded.

Main feature overview

Used-DiskSpace is a program to display the disk space statistics of the fixed disk(s) of a computer and can be run on the command prompt, in a batch or logon script without administrative rights. When the output is stored as an unicode file on a file server (see examples), command line commands can be used to prepare the data for analysis in Excel.
Data gathered for every fixed disk in a computer is:
  • Fixed drive letter
  • Volume Label
  • File System (FAT/NTFS/ReFS)
  • Available space to current user: This is the available free disk space for the currently logged on user.
  • Total available space: This can be larger than the previous value when using user quota.
  • Total size of drive.
  • Total Used size of drive

Other features:
  • Used-DiskSpace is agentless and requires no installation and configuration on every computer monitored
  • The program can run over the network using a logon server
  • Standard Unicode based data files can be stored on a file server instead of using complex to configure databases and client server applications.
  • Well known Microsoft Excel features such as AutoFilter and conditional formatting can be used to quickly analyse the data.

Used-DiskSpace version is free.



The first version of Used-DiskSpace was designed to quickly but very clearly report the disk status of PC's and notebooks in a corporate worldwide network. This program can be used on the command prompt or in a logon script. When the data is redirected to a file and written on a central network share, the data can be easily accessed. Some filtering is possible using the command line program FindStr
Used-DiskSpace is now optimised for data analysis in for example Microsoft Excel as it can now write an optimised unicode data file on a file share.


The program Used-DiskSpace is very easy to use, but very flexible. The small program runs quickly and the resulting data can be redirected to a file on the local disk or writeable network share on a file server. These files containing the disk statistics can be filtered with standard command line tools, such as FindStr, and resulting data can be analysed in Excel using standard filtering and conditional formatting. This enables the lean program Used-DiskSpace to run quickly from network shares in login scripts over the (WAN) network connections whilst providing easy access to central stored data.


The program Used-DiskSpace is licensed according to the EULA in the download. Read the EULA carefully before using the program. A recent copy can be downloaded here


The program Used-DiskSpace now has two case insensitive parameters.
  • /Help or short /H
  • /File of short /F

Run Used-DiskSpace with no parameters

When run on the command prompt without any parameters, Used-DiskSpace produces the following output (Data depends on the computer configuration)
Drive C:\
  File type: Fixed
  Volume label: Windows
  File system: NTFS
    C:\ "Available space to current user":   45,630,607,360 bytes
    C:\ "Total available space":             45,630,607,360 bytes
    C:\ "Total size of drive":              237,555,937,280 bytes
    C:\ "Total Used size of drive":         191,925,329,920 bytes
Drive D:\
  File type: Fixed
  Volume label: HP_TOOLS
  File system: FAT32
    D:\ "Available space to current user":    2,060,242,944 bytes
    D:\ "Total available space":              2,060,242,944 bytes
    D:\ "Total size of drive":                2,139,095,040 bytes
    D:\ "Total Used size of drive":              78,852,096 bytes

Getting Quick help on Used-DiskSpace

By typing Used-DiskSpace with the optional parameter /Help or /H, Used-DiskSpace will show its options and some simple examples
Used-DiskSpace help screen
Used-DiskSpace help screen. The .Net 4 version can be recognised by the 6th line being: "This .Net 4 program has two parameters"
When pressing the "w" or "W" key, this page on the internet will be opened in your default browser. Any other key will show the current disk statistics.

Using Used-DiskSpace with the file save option

When running Used-DiskSpace with the /File or /F option, a file name must be provided to store the unicode data. The file name may contain a path using either a mapped drive ("G:\PublicFiles") or an UNC path (\\nlaalfs1\PublicFiles).
When multiple files are stored on a network share, these may be combined in one file using the tool Merge1File. The resulting file can easily be analysed in Excel.


  1. Show current disk status:
    Simply run the program in a command prompt window to see the current status of the disks in a computer:
    The program Used-DiskSpace can be run from a disk, network share, logon share or even an USB stick.
    Starting the program from a harddisk:
    Starting the program from the netlogon share:
  2. Write an output file:
    Writing the output file to a network disk on the file server nlaalfs1 in the hidden PublicData share:
    C:\batch\Used-DiskSpace /File \\nlaalfs1\PublicData$\%computername%_%username%.txt
    Here the file name is constructed with the system parameters of the current computer name and user name of the currently logged on user.
    The file option can also be used in upper case, lower case or you can even use the first letter only. So the following options are equal: /FILE, /file, /File, /F and /f.
  3. Merge the files for analysis:
    If you want to analyse all the disks in your enterprise network with Excel, you can use the tool Merge1File to combine all the files in the hidden PublicData share in a new file. This file can be opened in Excel.
    c:\batch\Merge1File /s \\nlaalfs1\PublicData$\*.txt /d MergedData.txt
    Merge1File is a tool that has some great options used default here. Read more on the product page.
  4. Process the data in Excel:
    The merged file can easily be opened in Excel. Using conditional formatting and AutoFilter, disk analysis of hundreds of computers can be done in minutes. See the demonstration movie created with LICEcap.
    The following example shows how easy it is to import the merged file in Excel, format the data the way you want it, highlight the disks that contain less than 20GB free disk space and show only the operating system disks (C:\)
    Animation showing how quickly disk spaces can be analysed
    Animation showing how quickly disk spaces can be analysed.
  5. The Excel Macro that automates it all:
    Sub UsedDiskSpace() ' ' UsedDiskSpace Macro ' This macro is an example included with the product Used-DiskSpace by ' (C)Copyrights 2017 - 2021 by Johan van Soest ' Version 1.0 to be used with Used-DiskSpace version 1.2 ' Dim sMinimalFreeDiskSpace As String sMinimalFreeDiskSpace = "20000000000" ' Convert text to columns (text is in column A) Columns("A:A").Select Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _ :=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _ Array(7, 1), Array(8, 1)), TrailingMinusNumbers:=True ' Set numerical formatting to thousand digit "," and no decimal places Columns("E:H").Select Selection.NumberFormat = "#,##0" ' Configure header Rows("1:1").Select Selection.Font.Bold = True ' Set auto filter Columns("A:H").Select Selection.AutoFilter ' Set column width so all data can be read Columns("A:H").EntireColumn.AutoFit ' Select available space to current user column Columns("E:E").Select ' Set Conditional formatting: highlight every ' "Available space to current user" less than sMinimalFreeDiskSpace Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _ Formula1:="=" + sMinimalFreeDiskSpace Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority With Selection.FormatConditions(1).Font .Color = -16383844 .TintAndShade = 0 End With With Selection.FormatConditions(1).Interior .PatternColorIndex = xlAutomatic .Color = 13551615 .TintAndShade = 0 End With ' Set autofilter of "Available space to current user" column to Less than ' sMinimalFreeDiskSpace Selection.FormatConditions(1).StopIfTrue = False ActiveSheet.Range("A:H").AutoFilter Field:=5, Criteria1:= _ "<" + sMinimalFreeDiskSpace, Operator:=xlAnd ' Select C:\ drive only ActiveSheet.Range("A:H").AutoFilter Field:=2, Criteria1:="C:\" End Sub

Previous Releases

The following table shows you the history of the Used-DiskSpace project.
Version Features
1.2 Added support for an unicode output file. By using the option /File or /F the unicode output of Used-DiskSpace can be analysed very easy in Excel without any data transforms. No regional setting based commas or dots are used as 1000 separator in the file.
Programmed in Microsoft Visual c#.
The unicode output file now contains:
The unicode output file of Used-DiskSpace
The unicode output file of Used-DiskSpace
Using tab separators, quoted column labels and unformatted disk sizes allow for easy but powerful Excel data analysis. For Examples, see the Examples section.
1.1 Minimal formatting changes to make the redirected output even easier to analyse in Excel.
Programmed in Microsoft Visual c#.
The example of version 1.0 produces the following output with the same data:
Drive C:\
  File type: Fixed
  Volume label: Windows
  File system: NTFS
    C:\ "Available space to current user":   42,011,025,408 bytes
    C:\ "Total available space":             42,011,025,408 bytes
    C:\ "Total size of drive":              119,926,681,600 bytes 
    C:\ "Total Used size of drive":          77,915,656,192 bytes
The files can then be processed in to one large file using the command:
FindSTR /c bytes \\nlaalfs1\Disk-Usage$\*.txt >> AllData.txt
This file AllData.txt can be imported in Excel as it stores the data in the following format:
PC0001_John    C:\ "Available space to current user":   42,011,025,408 bytes
PC0001_John    C:\ "Total available space":             42,011,025,408 bytes
PC0001_John    C:\ "Total size of drive":              119,926,681,600 bytes 
PC0001_John    C:\ "Total Used size of drive":          77,915,656,192 bytes
Adding the spaces in front of the drive letter compared to version 1.0, allows easier separation of PC and disk data in an Excel sheet. And allows for easier filtering on drive characters.
1.0 The great program Used-DiskSpace can be used in a batch file, logon script or on the command prompt to simply but clearly show the relevant data of the fixed disks in a Windows Desktop or Notebook PC.
Output of the program can be redirected to a file on a file share for central analysis. The standard command line tool FindStr can be used to process the data.
Programmed in Microsoft Visual Studio c#

The following example can be used in a logon script and creates a file on the hidden file server share \\nlaalfs1\Disk-Usage$
By using the command shell system variables ComputerName and UserName, an unique file is created on the file server nlaalfs1
Used-DiskSpace > \\nlaalfs1\Disk-Usage$\%computername%_%username%.txt
This produces a file in the format:
Drive C:\
  File type: Fixed
  Volume label: Windows
  File system: NTFS
C:\ "Available space to current user":   42,011,025,408 bytes
C:\ "Total available space":             42,011,025,408 bytes
C:\ "Total size of drive":              119,926,681,600 bytes 
C:\ "Total Used size of drive":          77,915,656,192 bytes
The files can then be processed in to one large file using the command:
FindSTR /c bytes \\nlaalfs1\Disk-Usage$\*.txt >> AllData.txt
This file AllData.txt can be imported in Excel as it stores the data in the following format:
PC0001_JohnC:\ "Available space to current user":   42,011,025,408 bytes
PC0001_JohnC:\ "Total available space":             42,011,025,408 bytes
PC0001_JohnC:\ "Total size of drive":              119,926,681,600 bytes 
PC0001_JohnC:\ "Total Used size of drive":          77,915,656,192 bytes
This data can be analysed in Excel when using the space as column separator.


Download, unzip and copy the program Used-DiskSpace anywhere you want on the disk. By placing the program on the netlogon share of a domain controller, the program Used-DiskSpace can be used in logon scripts thus refreshing the data files on a daily base.

System requirements

Used-DiskSpace is designed for the .NET platform with Microsoft C#. Therefore the Microsoft .NET Framework 2.0 is required.
Windows VersionRuns .Net 2.0Tested
Windows XPYesNo
Windows VistaYesNo
Windows 7YesYes
Windows 8.1YesNo
Windows 10YesYes
Windows Server 2008 SP2YesNo
Windows Server 2008 R2 SP1YesYes
Windows Server 2012YesNo
Windows Server 2012 R2YesNo
Windows Server 2016YesYes
Now a .Net 4.x version is available for machines that default do not include .Net 2.0 (Windows server 2012, 2012 r2 and 2016). It is also available from the download page.

Support matrix will only support the latest version of free software.


Upon clicking the "Start download process" button, you get to another web page where you have to agree to the End User License Agreement (EULA) before you can download the program Used-DiskSpace.

Frequently Asked Questions (FAQ)

Just use the postcard icon in the left menu to ask a question.
You may vote your opinion about this article:

Scripts and programming examples disclaimer

Unless stated otherwise, the script sources and programming examples provided are copyrighted freeware. You may modify them, as long as a reference to the original code and hyperlink to the source page is included in the modified code and documentation. However, it is not allowed to publish (copies of) scripts and programming examples on your own site, blog, vlog, or distribute them on paper or any other medium, without prior written consent.
Many of the techniques used in these scripts, including but not limited to modifying the registry or system files and settings, impose a risk of rendering the Operating System inoperable and loss of data. Make sure you have verified full backups and the associated restore software available before running any script or programming example. Use these scripts and programming examples entirely at your own risk. All liability claims against the author in relation to material or non-material losses caused by the use, misuse or non-use of the information provided, or the use of incorrect or incomplete information, are excluded. All content is subject to change and provided without obligation.
Generated by WebHalla™ Version 0.1.e.5 : Monday 8-3-2021 © Copyright 1995-2021 ing. Johan P.G. van Soest CIPM Certified Privacy Information Manager
Response Form    Cookie- and Privacy statement
Weather in Waalre by OpenWeatherMap logo mist
Temperature 0.62 °C mist
Wind chill -2.14 °C mist
Humidity 93 % mist
Air pressure 1023 hPa mist
Wind speed 1.03 m/s mist
Wind direction West West mist
Sun Rise 7:07 Sun Rise
Sun Set 18:30 Sun Set
Updated:2021-03-08 06:33:30 mist

Weather Cache is 3 minute(s) old.