Harriet_Kim_1764

How to Exclude certain File Extensions in a File Transfer

Discussion created by Harriet_Kim_1764 on Sep 20, 2017
Latest reply on Sep 26, 2017 by Harriet_Kim_1764
A user wants to exclude files from a managed file transfer job (JOBF).

Currently, the job retrieves all files at a location with the wildcard character (*).

The user wants to be able to exclude a select set of files with a given extension. 

Example: 
Select all files (*) except for files ending in .xls (*.xls). 

Possible solution:
1.  A VARA file list object grabs a list of file names from a directory:
ksj6adxj0fqg.jpg

2. In the JOBF's process tab, create a script that gets the list of files from the VARA object and excludes files ending in .xls:
!Get files from file list VARA and exclude .xls :SET &HND#=PREP_PROCESS_VAR(VARA.FILELIST.REQ00138198) :PROCESS &HND# :  SET &FILE#=GET_PROCESS_LINE(&HND#,1) :  SET &CHECK#=STR_ENDS_WITH(&FILE#,".xls") :  IF &CHECK#="N" :  PRINT &FILE# :  ENDIF :ENDPROCESS
3. In the FileTransfer tab, refer to the &FILE# variable in the file path:
4jvmvx7yc306.jpg

Outcomes