During the transfer of a file, type the file’s name using File Name Tokens instead of a regular file name.
The following examples use the system date/time: Wednesday, April 25, 1996 5:03:45.061 PM.
In the following example, you enter a string of File Name Tokens instead of entering a standard file name. Then the MFT Platform Server or Responder resolves the string into the directory name and file name.
- File name:
C:\directory\$(SDD)$(SMON)$(SYYYY)\$(SHH24)$(SMI)$(SSS).dat
- Resolved file name:
C:\directory\25APR1996\170345.dat
In the following example, you use the File Name Tokens to generate a resolved file name that has dashes between the date and time fields:
- File name:
C:\directory\$(SDD)-$(SMON)-$(SYYYY)\$(SHH24)-$(SMI)-$(SSS).dat
- Resolved name:
C:\directory\25-APR-1996\17-03-45.dat
In the following example, the MFT Platform Server or Responder resolves the tokens in the file name into a long file name using uppercase and lowercase letters:
- File name:
\\Server\Volume\$(SMonth)\projectX\$(SWeekday)\products.xls
- Resolved name:
\\Server\Volume\April\projectX\Wednesday\products.xls
In the following example, the template is used to create a DOS 8.3 formatted file name whose 3-character extension contains an encoded representation of the date. The number of days in a week is also used as part of the file name. In this case, the 0-based version is used. the 1-based day of week is also provided.
- File name:
C:\DOS\SHORTNM$(SW0).$(SM)$(SD)$(SY)
- Resolved name:
C:\DOS\SHORTNM4.4P6
In the example, you use the File Name Tokens to create a file name in which the month is substituted for the server name, the day is substituted for the volume name, the time is separated by spaces, and the file name with the 3-character day of week abbreviation serves as the 3 character file name extension.
In the following example, you use DNI and File Name Tokens. You place
sample.txt in the DNI directory and use File Name Tokens to designate the transferred file’s directory and file name.
- File name:
C:\$(RemoteUserID)\$(LocalFileName)\$(LocalPathWODrive)
- Resolved name:
C:\pat\sample.txt\$(RemotePathWODrive)
Note: Using $(LocalPathWODrive) or $(RemotePathWODrive) takes the path specified in the file name and transfers the file to the same directory, but different drives.
The various available time tokens are resolved at the beginning of a file transfer from the Initiating Platform Server. As a result, if a file transfer fails and goes into retries, the initial file name that is set does not change even though the transfer can be done at a later time due to retries.
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.