View Single Post
  #2  
Old 03-06-2003, 06:47 PM
schmidt4hire schmidt4hire is online now
Registered User
 
Join Date: 12-17-2002
Posts: 2
Warren, the %DATETIME% macro is expanding to include invalid filename characters.

If your example was run today at 1:25:42 PM, and %PROJDIR% evalulated to "C:\MyProject", the log filename would evaluate to "C:\MyProject\Results_1/7/2003 1:25:42 PM". The forward slashes (/) between the day/month/year and the colons (:) between the hour:minutes:seconds are all invalid filename characters.

When this happens, VBuild is likely getting a error when it tries to create the logfile and just forcibly continues, without any logging.

Try changing your project so that it automatically creates the BUILD_DATETIME macro as one of the first steps, and then set its value to something like this (using the square-bracket notation to run some VBScript code):
[ Year( Now ) & "_" & _
Month( Now ) & "_" & _
Day( Now ) & "_" & _
Hour( Now ) & "_" & _
Minute( Now ) ]

This would give your filename the value of "C:\MyProject\Results_2003_1_7_13_44". Granted, this is kinda gross, but it will work. You can fiddle more with VBScript if you want a better formatted filename. I couldn't see an easy way to format a number with leading zeroes.

Cheers,
Doug

Creo
Doug Schmidt | Software Developer (Inkjet MDA) | Tel: +1.604.451.2720 ext: 3190 | <mailto:doug.schmidt@creo.com> | www.creo.com
IMAGINE CREATE BELIEVE
Reply With Quote