Rename all files
Whether your archive or ERP system has particular filename requirements, your invoice files need to be short or of fixed length, or you simply need to add a specific prefix to filenames, for example, ReadSoft Collector can automatically rename all processed files according to your specifications - separately for each job. One or more environment variables can be included to ensure that the resulting filenames are unique. The following procedure explains to you how to include environmental variables:
- Open or create the job in which you want to change the names for attached/processed files.
- In the settings of the dialog box that is displayed, select Data source extension as the invoice source.
- Select ReadSoft Collector in the list.
- Click Configure.
- On the Input tab, select Rename all files.
-
Select appropriate macros in the list and click
Insert Macro, and/or type the text that you want to use to create filenames
for all processed files in the box provided. When this box is filled in, the text specified replaces the file names of all files
that have been processed in Interpret and sent to Transfer (including the original file).
If characters that are not allowed by the host operating system are used (for example, \ / : * ? \ " < > |), they are replaced in the filenames by an underscore character (_).
The characters that are not allowed will vary depending on the operating system. -
Click
OK to close the dialog box. Save your changes if prompted to do so.
- When specifying the filename format, it is possible to create filenames that are not unique (using %DATE%_%PID%, for example). This works in Interpret since ReadSoft Collector checks for duplicate filenames and adds a number (n) to the filename when needed (for example, invoice.tif, invoice(1).tif, invoice(2).tif, and so on). However, this will not work if you need filenames with a fixed length or if you specify a single destination folder in the Transfer job (since files with the same names may already exist there).
-
The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. The path = attachmentfolder/YYYY-MM-DD/GU.
Ensure that resulting filenames are unique when using Rename all files. To do this, unique environment variables such as %GUID%, %SHORTUUID%, or %DATETIME% can be used in combination with other variables that are not unique (such as those mentioned in the note above or %COMPUTERNAME%, for example).The renaming of processed files for XML invoices
When processing XML invoices from a folder, outgoing filenames must be unique since invoice files with the same names as previously processed files can be added to the folder at a later time. Consequently, ReadSoft Collector automatically ensures that filenames are unique in this case by adding a default prefix to every file that is generated for XML invoices. The format used is PID_GUID_Originalfilename.xml includes any correspRename all filesonding 000, SXML, or PDF files. However, if this does not meet your requirements, you can change it by selecting Rename all files and specifying what you need.
Available environment variables What is added to the filename - multiple variables can be added, and the text for each variable is added to the filename in the order they are listed in the entry box. %GUID% 36 characters. This is a globally unique ID with approximately 5.3x10^36 combinations. %APPLICATION% "eiitrp" (that is, the name of the program that processed the files) %PID% 1-5 characters depending on Interpret's process ID number on the machine where the files were processed. %COMPUTERNAME% The local name of the computer on which the files were processed. %DATETIME% The date and time the files were processed consisting of 18 characters ("yyyyMMddHHmmssffff"). %DATE% The date when the files were processed (including month, day, and year) consisting of 10 characters ("yyyy-MM-dd"). %ORIGINALFILENAME% The original file name of the invoice file. %YEAR% The year when the files were processed consisting of 4 characters. %SHORTUUID% 18 characters. This is a shorter unique ID with approximately 3x10^20 combinations. %JOBNAME% The name of the ReadSoft Invoices job that was used to process the files. %^INPUTSOURCENAME% The name of the ReadSoft Collector input source that was used to process the files.
Related topic