cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP - Move file after it is written

Former Member
0 Kudos

Hi!

Is there a way to write a file to a folder, and when it is done move the file to another folder? I know it's possible to use the "write temporary file" feature but my client want the file to be moved.
How can I do this the most simple way in the SFTP adapter?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use the option "Archive File on PI server"

Along with this use the "command line - run command line after message processing" to write a script in processing tab to delete the files.

Let me know if it helps.

Thanks,

Sudhansu

Message was edited by: Sudhansukumar Behera

Former Member
0 Kudos

Hi,

One more point. Please check the compatibility matrix for SFTP adapter as per note: 1695563 and 1690557.

This could be an issue why you are not able to see "run operating system commands"

Thanks,

Sudhansu

Former Member
0 Kudos

Hi,

This can be the issue...We use PI 711 SP12 and the first version of SFTP-adapter. Seems they are not compatible?

Former Member
0 Kudos

Hi,

You may wait for experts to respond(i don't have the PI 711 SP12 to check) or create an message to SAP.

Thanks,

Sudhansu

former_member184720
Active Contributor
0 Kudos

Refer to my reply in the below thread -

http://scn.sap.com/thread/3632656

AFAIK - this feature is provided as part of SP01 secure connectivity add-on.

Former Member
0 Kudos

This is so strange...I have now upgraded to SP04 for SFTP-adapter. We also have made sure that J2EE-role is assigned. And I still can't see the OS commands

former_member184720
Active Contributor
0 Kudos

>>>This is so strange...I have now upgraded to SP04 for SFTP-adapter. We also have made sure that J2EE-role is assigned. And I still can't see the OS commands


Did you also import the ESR content after the upgrade? you should see this option under SFTP adapter metadata.


Former Member
0 Kudos

Hmm...I'm not sure what you mean.

I have downloaded and deplyed PIB2BPGP04_0-20009372.SCA and PIB2BSFTP04_6-20009365.SCA.

When I look at software components it says it's SP04.

former_member184720
Active Contributor
0 Kudos

You should also download the ESR content from Service market palce for your SP level and import into Repository.

You can download it from market place path ->

Support Packages and Patches - P" PI SFTP PGP ADDON" PI SFTP PGP ADDON 1.0

Comprised Software Component Versions

XI CONTENT SFTP ADAPTER 1.0

Former Member
0 Kudos

It works now! Thanks!!

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!

Thanks for reply. I can only see "run operating system commands" at FTP adapter, not SFTP 😕

Anyone know why?

suman_saha
Contributor
0 Kudos

Hi,

Which SFTP adapter are you using?

There should be the option in processing tab.

Suman

suman_saha
Contributor
0 Kudos
suman_saha
Contributor
0 Kudos

Hi,

There may be different approaches:

1. Write OS command after processing as Rudra suggested

2. You can use another file to file scenario without ESR and just move the file. The sender channel will be in Delete Processing mode.

2nd approach is useful if you want to move the file into different server and 1st approach is preferable if you want to move into another folder in same server.

Suman

azharshaikh
Active Contributor
0 Kudos

Hi Stefan.

Assuming the file is at Receiver SFTP that you want to move...you can create 1 more flow using Standard approach as follows:

SFTP --->  File (SFTP) and do a pass through File Transfer to required location

(Configure Interval (msec) for modification check option in Sender SFTP CC)

Regards,

Azhar

Former Member
0 Kudos