I have a master project and child projects which all use the same XML log file. I want to delete the log file each time the master project is built, but if I check the application option to delete the log file at the start of the build, it also gets deleted when each child project builds. How can I achieve this capability?
The
application option to delete the log file at the start of the build is a global option that affects all builds, so that option should be unchecked in this situation. To delete the log file only at the start of the master project, open the
Script Editor and add a script function for the vbld_BuildStarting
script event (by clicking the Events button), and add the following code to it:
Code:
vbld_FSO.DeleteFile(vbld_AllMacros().Item("LOGFILE"), True)