$mday = sprintf('%02d', $mday) ; # Not used in this script, but returns a 2 digit day $mon = sprintf('%01d', ++$mon) ; # Returns a 1 digit month until we get to 10 then use 2, not my choice. $year = 1900 + $year ; # Returns a 4 digit year $outdir = "_" . $year . "\\" . $mon . "\\" ; # Build the directory name based on date where the file is going \_2011\9\