User Submitted Macro

Get Free Space

Written by John Greiner

What it does

Get the amount of free space on a drive.

To install

Download the file umgetfreespace.mex and save it to your hard drive where you store your macro file(s). Open this macro file or import the macro into your existing macro file by clicking File, Import, Import Macros.

To use

This macro file contains two separate macros: ‘Get Free Space’ and ‘Test Get Free Space’. When you press the Ctrl+Shift+E hotkey, the ‘Test Get Free Space’ macro asks for a drive letter. Then the amount of free space is displayed for that drive.

The ‘Get Free Space’ macro is written so it can be incorporated within your existing macros via a Macro Run command.

How it works

The macro opens a Windows Command Prompt. Within the Command Prompt it changes to the appropriate drive letter, performs a dir command with the output written to a file and then parses the file for the free space.

Requirements

– Macro Express Pro or later

** John received a Macro Express T-shirt in appreciation for his sending us his macro.