Showing results for 
Search instead for 
Did you mean: 

Picking the abc.B file if abc.A file is present in source location.

Former Member
0 Kudos

Hi All,

I need to pick a file using SFTP adapter.

In the source location two files abc.A and abc.B are placed.

abc.A is placed only after abc.B is fully processed and complete.

I need to pick and process the file abc.B ,only after finding abc.A in source location.

only abc.B should be picked ,as abc.A file is just a indicator that abc.B is fully loaded and ready to be processed.

How this can be done in SFTP adapter?Please help.



Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shekar/Pragati,

In SFTP there is no option to give OS command.

@Shekar: Am new to UNIX scripting,.Can you please direct me to any links related to unix scripting so that i can write in FTP.

Former Member
0 Kudos


Run a OS level command to check the existence of abc.A file and in the filename parameter in channel mention abc.B file name.

I think there is no need to create a new directory to copy the abc.B file.



0 Kudos


The " OS level command " can only help, if you are using protocol as NFS, not FTP.

-> An Custom adapter module at the sender file adapter , which read the file name as if FLAG file (abc.A) is there, read the abc.B from the directory from the directory.



Active Contributor
0 Kudos

Best way to handle this is write some Unix Sxripting program at OS level copy the file B wheneve A file present in Folder,and create one more folder on FTP to store only B file,and connect to new folder using SFTP adapter .

it will avoide burden on implementing logic in PI is bit simple too,as per my exp.

no standard feature available to acieve this type of requirement i think .