File naming conventions

Top  Previous  Next

The most common scenario is that for every embedded file you want to export, there is a corresponding column that stores a file name.  For example, you may have the following table:





The description column stores the original file name, while filedata is an OLE Object field containing the file contents.  In this case, you can use the following naming convention for the exported files:




This instructs the product to use the value in the description column when naming the exported files.  When you want to use values from any column as part of the file naming convention, enclose them in angled brackets e.g. <description>, <id> etc.


What happens when different rows may contain files of the same name?  Or if you need to associate a file with a particular row?  You can then use the <%row:0000%> tag to add the row number as part of the file name e.g.




generates the following output:




You can combine multiple column values by simply enclosing each column name in angled brackets.  For.e.g if we wanted to use values from both the ID and description columns, we can do so this way e.g.




For numeric values, you can format them to a fixed number of digits.  In our example, using <ID> alone generates values which are not easily sorted.




Entering <ID:0000> will generate values with leading zeros (maximum 3 in this case), which are more easily sorted.






For embedded OLE packages, the product can extract the original file name directly from the package and use it in the naming convention.  For example, the following table contains only an ID field and a OLE Object field.




To name the packages using their original file names, select the use original package file name option.




If you need to mix both column values and the original package file name in the exported file name, select the use custom name option, and use the <%package_file_name%> tag for the original package file name e.g.





Creating dynamic sub-folders


If you want to store each exported item in its sub-folder, or group similar items into the same sub-folder depending on the values in the table, you can use the column tags as part of the export folder naming convention.


E.g. say we want to store the files above in their own sub-folder, based on the ID value.  We will then enter the Output folder value this way:




If we wanted to format the value to 4 digits as above, we would enter the following: