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:

 

naming_01

 

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:

 

naming_03a

 

This instructs Access OLE Export to use the value in the description column when naming the exported files.

 

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.

 

naming_05a

 

generates the following output:

 

naming_05b

 

If your table contained an ID field, you could also use that as part of the naming convention e.g.

 

naming_07

 

Enterng <ID> alone generates values which are not easily sorted.

 

naming_06

 

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

 

naming_07a

 

naming_07b

 

For embedded OLE packages, Access OLE Export 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.

 

naming_08

 

Using the <%package_file_name%> tag, Access OLE Export exports the embedded packages to files using the original file names.

 

naming_09

 

 

naming_09a