You should not put vars in quotes.

$FileMonth = SUBSTR(GETFILETIME("$InventFile"), 6, 2)

should be:
$FileMonth = SUBSTR(GETFILETIME($InventFile), 6, 2)

but then Shanes code looks like you can toss yours in the recycle bin.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.