User Submitted Macro

Size of Folder

Written by David Moen

What it does

Here is a small macro that will determine the size of all the files in a folder.

To install

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

To use

Include a ‘Macro Run: Variable_Set_Integer_from_size_of_folder’ command in one of your macros or run the ‘Variable_Set_Integer_from_size_of_folder’ macro separately.

How it works

The macro will allow the user to browse to the folder to use using the ‘Variable Set String from Folder Name’ command. Then the ‘Repeat with Folder’ command is used to get the filename of every file in the specified folder and the ‘Variable Set Integer from the size of file’ command is used to get the size of the file. The ‘Variable Modify Integer: %N1% = %N1% + %N2%’ to keep a running total of the size. Finally, the size is displayed using a ‘Text Box Display’ command.