Overwrite: Set How Process Output Files Save
Tag: Overwrite
The action Overwrite lets you set the way the applications will save files written by process outputs (e.g. Export).
Detailed Description
The default setting is <Overwrite Value="False"/>. The file will be saved with an incremented file name if saved to the same location as a file with an identical name. If the same process output file is saved again without modification to the file name, it will be incremented again. This will continue until it is no longer possible to save the file due to naming constraints.
When the Overwrite action is set to <Overwrite Value="True"/>, saving to a path where a file with the same name already exists will cause the existing file to be replaced.
Tag Attributes
Attributes | Attribute Values |
---|---|
Value | True / False - Not Required |
Example Scripts
<Overwrite Value="True"/>
<ytriaAutomation>
<Overwrite value="False"/>
<Export>
<SetParam target="ExportToFile" field="FilePath" value="D:\ExportGrid.xlsx"/>
<SetParam target="ExportToFile" field="FileOutput" value="Unicode"/>
<SetParam target="ExportToFile" field="OpenFileOnceGenerated" value="false"/>
</Export>
</ytriaAutomation>
In the script above, if the file path D:\ExportGrid.csv already exists, the output file will be saved as ExportGrid1.xlsx