cancel
Showing results for 
Search instead for 
Did you mean: 

OS command in File Sender Adapter

Former Member
0 Kudos

Hi ALL,

We have a requirement in Sender file FTP scenario to check for a Trigger file first before picking the actual data file.becuase the sender sytem genartes a trigger file after data file is created so we have to check for the trigger file first and then process the data .

Now I am planning to use OS command to achive this requirement

Step 1

OS command before message Processing will check for the trigger file in the FTP server and if the file exist then will allow the file adapter to process the actual data file. Else to throw a time out error.

Question : we put our script in our PI system and will point to that script %F (absolute file name including path) ,is that possible for that script to connect to the FTP system and check for the trigger file..? How can I achieve this .. ? pls if possible send me the Script

Step 2:

In OS command after message Processing I will search for the same file and delete it.

Thanks

Shakeif

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The help documentation states that message processing is independent of the execution of the OS command. This would in turn pose a question as to what you want your OS command to do if the file did not exist. As an alternative option you could try moving the actual data file into a folder being polled by the adapter only after the detection of the trigger file and then continue the processing.

Former Member
0 Kudos

Can you pls explain the method you are suggesting in detail or in steps ..?

regards

Shakeif

Former Member
0 Kudos

Hi,

We have a requirement in Sender file FTP scenario to check for a Trigger file first before picking the actual data file.becuase the sender sytem genartes a trigger file after data file is created so we have to check for the trigger file first and then process the data .

Why you want to check for the trigger file first? Is there a business requirement that you should process the Data file only after you have checked the trigger file?

If there is no constraint as such, then you should process the Data file and then archive / delete it. Elaborate your requirement.

Regards,

Neetesh