Adding a timer to the script

You can add the following lines to a script to check how long it takes to process.  The commented lines show how to get the date and time.  The timer gives the seconds and milliseconds so it is great for using as a timer.

Since the Timer function counts seconds from midnight if your run time passes midnight then it will return an inaccurately large result.

Progress Bar

The following code will set-up the variables, display the progress bar and update it.

Find Files from a directory

This script will optain the files of a certain type located in the specified directory. 
path is the directory
ext is the extension such as txt for text files or imd for idea files
files() is the array that will hold all the files that are returned.