cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI: Move file to archive or error folder based on Odata response

ravi_nagarvwr
Explorer

Hello Experts,

I am working on SFTP to OData scenario, where I need to move files after processing in archive or error directory.

  • I have set the property "archiveDirectory". for Odata success response it is set to "/archive" and for failure, it's set to "/error".
  • SFTP sender channel archive directory value : /${property.archiveDirectory}/${date:now:yyyyMMdd}/${file:name}

attached screen shot below

Content modifier set after Odata Call.

if I give a direct directory path "archive/${date:now:yyyyMMdd}/${file:name}" then it's working fine, But in a dynamic path it's not working.

can anyone help me what is the issue here?

I referred Bhalchandra Wadekar blog as a reference.

Thanks,

Ravi

View Entire Topic
kc_kristris
Active Participant
0 Kudos

Hello Ravi,

Can you try with below:-

${property.archiveDirectory}/${date:now:yyyyMMdd}/${file:name}

//${property.archiveDirectory}/${date:now:yyyyMMdd}/${file:name}

Regards,

Kris

ravi_nagarvwr
Explorer
0 Kudos

Thanks, Kris

It was path issue.

hendrikp
Explorer
0 Kudos

Hello kc_kristris

I want to navigate one folder back and set another folder

If i hardcode ../somefolder in the postprocessing field it works but when I set the archiveDirectory property to ../somefolder and put ${property.archiveDirectory} in the postprocessing field it does not work.

Any idea?