![]() | ![]() | ![]() | ![]() | ![]() |
Switch /DeletePrev[:YesOrNo] |
This is a PPWIZARD command line switch. You can set up your own default switches in the "PPWIZARD_OPTIONS" environment variable or in project files.
PPWIZARD can be made to deletes any files generated on a previous build before starting the next build. The build will fail if a file can't be deleted. This mode is off by default as typically one input file generates one output file and it takes a little extra time.
This switch is useful where a single input file can produce many output files. In these cases obsolete files can easily build up in the output directories.
The deletion process uses the dependancy file built by the previous build so you must also be using the "/DependsOn" switch for older files to be deleted.
If you were to rely on this switch deleting older files then you would also wish to use the "/DeleteOnError" switch.
Obviously this process is not perfect, if the machine traps and reboots during a build nothing will delete those files that were generated. Also the complete deletion of a obsolete input file does not cause the deletion of the associated output files (yet)...
To cover all bases you could generate into a unique directory (or generate distinctive filenames) for those processes that generate multiple files and use a BEFORE "/Hook" switch to clean up the directory where a rebuild is required.
WARNING |
I have still not figured out a clean/easy way of deleting obsolete dependancy and output files where the input file is removed. When I do so this switch is likely to be affected (possibly different parameters or removed).
![]() | ![]() | ![]() | ![]() | ![]() |