Specifying unique filenames when saving files

 

The format specifier can be used to generate unique output filenames by inserting a sequentially increasing number into the name. The format specifier "%d" applies to each of the following options:

§  /save-data

§  /save-text-data

§  /save-merge-data

§  /save-merge-text-data

 

Without the format specifier in place, consecutive runs of an application will overwrite the specified output file. Consider the following:

purify /save-data=foo.pfy foo.exe

In this case, the first run would create foo.pfy. Subsequent runs would simply overwrite foo.pfy.

Now consider the case where the format specifier is used:

purify /save-data=foo%d.pfy foo.exe

In this case the first run would create foo.pfy. The second run would create foo0.pfy.

 

The specifier can also include a width value which determines the number of characters for the numeric value added to the filename. Consider the following:

purify /save-data=foo%3d.pfy foo.exe

In this example, the output files generated for the first two runs will be foo000.pfy and foo001.pfy.

 

If the '%' character is not followed by the width (optional) value and the letter 'd', the '%' is dropped and the trailing characters are retained. To generate a

filename that contains an explicit '%', use '%%'.

 

Note: For Quantify and PureCoverage, the saved filename is also changed when using the QuantifySaveData() and CoverageSaveData() APIs respectively

(C) Copyright IBM Corporation 1993, 2010.