Questions: |
Answer: Control-M for Advanced File Transfer has Autoedits/Variables that are set when the file is transferred. The Autoedits/Variables are listed in the Control-M for Advanced File Transfer Administrator Guide. These Autoedits/Variables can be used in the job under the Advanced Tab -> General Tab -> After Completion. You can locate Advanced Tab when defining a File Transfer Job. Once clicked on Advanced tab ,the Advanced dialog box appears. Be aware the use of Autoedit variables is very limited and connot use autoedit variables other that %%DATE, %%TIME and %%YEAR, neither is possible to define variables in job definition and use them on this rename field - The following AFT variables exist for renaming source or destination files after the transfer completes: $$AFTFILE$$: full file name (preserves extension) $$AFTFILE_ALL$$: full file name including the extension $$AFTFILE_NAME$$: name of the file until the last dot (without the extension) $$AFTFILE_EXT$$: the extension of the file name - The following syntax will postpend the date and time to the original filename: $$AFTFILE_ALL$$.%%DATE.%%TIME Following is an example for the rename: Original file name: filename.out. Result file name: filename.out.150508115632 - The following syntax will put the date time in the middle of the file and keep the extension: $$AFTFILE$$.%%DATE.%%TIME..$$AFTFILE_EXT$$ Following is an example for the rename: Original file name: filename.out. Result file name: filename.150508115632..out. - The following syntax will post append the date and time between original filename and file extension: $$AFTFILE$$_%%DATE.%%TIME Following is an example for the rename to using Filename.YYYYMMDD.Extension format: Original filename: filename.out Result filename: filename_20160508115632.out For more information on using AFT variables, see video article: In Control-M for Advanced File Transfer can I use variables to rename renaming source or destination files after the transfer completes when using wildcard transfers? |