"is there a way to have a file (ex. smith.log) and rename it to smith1205011200.log where the format is mm/dd/yy/hh/mm.log"
to get EXACTLY the format you requested:
DatePart("M", NOW) = today's month
DatePart("D", NOW) = today's day
DatePart("YYYY", NOW) = today's year
Right(DatePart("YYYY", NOW), 2) = last 2 of today's year
DatePart("H", NOW) = today's hour
DatePart("N", NOW) = today's minute
so, assuming sName = "smith" or some other variable name...
myFile.Move "c:\path\" & sName & DatePart("M", NOW) & DatePart("D", NOW) & Right(DatePart("YYYY", NOW), 2) & DatePart("H", NOW) & DatePart("N", NOW) & ".txt"
or...... could make it even simpler (if you don't mind the seconds being in there, too...
'format date/time as mm/dd/yy hh:mm:ss
'strip out /'s
sDate = Replace(FormatDateTime(NOW, 0), "/", ""
'strip out spaces
sDate = Replace(sDate, " ", ""
'strip out :'s
sDate = Replace(sDate, ":", ""
myFile.Move "c:\path\" & sName & sDate & ".txt"
would name the file:
c:\path\smith120701103301.txt