cancel
Showing results for 
Search instead for 
Did you mean: 

Read file path from source SFTP : SAP CPI

n_rvsavinashvarma
Participant
0 Kudos
2,342

Hi All,

We have requirement in SAP CPI to read filename and filepath details from the source SFTP server and pass it into mapping for one of the field. currently i am able to acheive fileName using camel expression but unable to succeed for filepath.

Could you please help with similar camel expression or groovy script to read the same.

Tried below filesystem camel expressions but no luck.

file:path

file:absolute

file:absolute.path

Regards,

Avinash

View Entire Topic
Sriprasadsbhat
Active Contributor

Hello Avinash,

Below will return the file path and make sure you add this to allowed headers of Runtime Configuration.

${header.CamelFilePath}

Regards,

Sriprasad Shivaram Bhat

n_rvsavinashvarma
Participant
0 Kudos

Hi Sriprasad,

Thanks for the quick response.

What i need to give in place of "value" after creating new header.

Thanks,

Avinash

AG_3003
Discoverer
0 Kudos

Hi Sri

I've a requirement to read incoming as well as outgoing filename. Each transfer occurs over SFTP.

I've used ${file:name} to capture Incoming filename, and ${header.CamelFileName} to capture Outgoing filename. But both captured the input filename only.

Is there any other property which can be used to capture Outgoing filename.

 

Thanks.