Written by John Greiner
Get the amount of free space on a drive.
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.
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.
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.
– Macro Express Pro or later
** John received a Macro Express T-shirt in appreciation for his sending us his macro.