Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
An example...
;------------------------------------------ ; Loop 1 ;------------------------------------------ for x = 1 to 1000 Root = FileRoot(FileName) Ymd = TimeYmdHms() Year = itemExtract(1,Ymd,":") Month = itemExtract(2,Ymd,":") Day = itemExtract(3,Ymd,":") NewName = StrCat(Root,"-",Year,Month,Day,".txt") next ;------------------------------------------ ; Loop 2 ;------------------------------------------ For x = 1 to 1000 YmdHms = TimeYmdHms() NewName = StrCat(FileRoot(FileName),"-",itemExtract(1,Ymdhms,":"),itemExtract(2,Ymdhms,":"),itemExtract(3,Ymdhms,":"),".txt") nextOn my machine, loop 1 runs in about 1 second. Loop 2 (equivalent code with fewer statements) takes about .6 second.
But note: were only talking about .4 seconds saved. You'd have to have a really long and complex program to make this worth worrying about.
Article ID: W16004
File Created: 2004:03:30:15:42:10
Last Updated: 2004:03:30:15:42:10