HomeTutorialsEDI SolutionFile Names

File Names

The following is an explanation of the use of file names within the SYSPRO EDI System.

Basic Description

File names are used extensively within the EDI system to designate the files read by the imports and created by the exports.  In addition, file names are formed by the system for archiving and other purposes.

Every import and export document setup asks for a file name.  The basic rule is simple - the file must be accessible by the SYSPRO server process. This generally means the file should reside on the SYSPRO application server.  It can be in the same directory as SYSPRO or in a separate location.  Situating the files on a separate server is not generally recommended as file rights issues can cause problems, but it can be done with the use of UNC naming and a good knowledge of rights management. 

In the simplest of setups the full name and path to the file is entered into the document setup. "Spacey" file paths are not recommended and should be avoided or the short version of the path used.  However, it is generally better to set the common part of the path in the EDI System Setup.  The unique part of the filename is then entered into the document setup.  The two parts will then be brought together to form the full filename.  In this setup the common part of the path must end with a slash and the unique part in the document setup may not start with a slash.  Exceptions are allowed.  If the system sees a document filename that starts with a slash or has a colon as the second character it will assume this is an absolute file name.

The EDI system does not require any particular file name, file extension or directory setup. 


The EDI System setup contains "D:\EDI\" as the common path.
The document setup contains "Partner\850.txt" as the import file name.

The system will attempt to read the file "D:\EDI\Partner\850.txt".

Import File Name Wild Cards

The file name for an import document may contain an asterisk "*" as a wildcard as part of the filename.  The import will process all files that match.  The asterisk can only be part of the file name, not part of the directory path.


The EDI System setup contains "D:\EDI\" as the common path.
The document setup contains "Partner\850*.txt" as the import file name.

The system will attempt to read any file that matches "D:\EDI\Partner\850*.txt" such as d:\edi\partner\850a.txt etc.

Note:  If you are using the Input Sort program the import document file names can not contain a wildcard.

Export File Name Tokens

Output file names must be fixed, however, they may include tokens that will be replace when the export is run to form the actual file name.  The tokens are placed in the file name or path surrounded by <>.  The tokens are not case sensitive.  The following is a list of tokens which may be used.


Token Description
DATE Current Date in YYMMDD Format
YMD Current Date in YYMMDD Format
CYMD Current Date in CCYYMMDD Format
TIME Current Time in HHMMSS Format
COMM Communications Path
PARTNER Partner Code (Do not use if there are spaces in your partner codes)
PROGRAM The program name (I.E. EDI810 for the 810 Export)
DOC The document code (I.E. 810 for either the 810 Import or Export)
FDATE Formatted Date using FORMAT- attribute to specify exact format
UNIQUE Unique number is inserted into document name is a matching file name is found.  The number is incremented until a non-existing file name is found.
SEP Directory Separator ("\" on Windows, "/" on Unix/Linux)

In addition the tokens may be modified with token attributes by adding the attribute with () at the end of the token.  For example, to use just the HHMM portion of the TIME token, use the token <TIME(LENGTH=4)>.

See Token Attributes for more information.


The EDI System setup contains "D:\EDI\" as the common path.
The document setup contains "810<CYMD>-<TIME>.txt" as the export file name.

If it is 10:50am on March 10th, 2007 the system will create the file D:\EDI\810-20070310-1050.txt.

Archive Directories

To form the file name for archiving purposes the above tokens are all valid as well as the following additional tokens.

Token Description
PATH The full path of the original file.
NAME The name without the path of the original file.
BASE The base file name (no path or extension) of the original file.
EXT The extension of the original file.


Since 1991, as developer of the standard EDI, Shipping, and Freight Calculator Solutions for SYSPRO, our products are fully integrated with SYSPRO and drive efficiencies for hundreds of users worldwide.


For 35 years, SYSPRO has had a single product focus resulting in an award-winning ERP system with a track record of success for over 14,000 customers worldwide.