cancel
Showing results for 
Search instead for 
Did you mean: 

After the file is completely processed should be renamed in SFTP server

former_member217945
Participant
0 Kudos

Hi Experts,

I am doing FTP to SFTP scenario, I am sending .csv file to sftp server,  after a file is successfully picking from sftp , .csv file should be renamed to .got” file extension when is completely written and this file should in sftp server. so that cilent  come to know that file has been successfully picked up from sftp server and its renamed.

How can i do this?

Please advise

Thanks,

Reddy

Accepted Solutions (0)

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Reddy,

You can try with Defining OS Command after message processing(Defining OS Commands for Message Processing by SFTP Adapter - SAP NetWeaver Process Integration, sec...). Take into account that the file is in PI and you would need to do the SFTP connection in the batch file. Check this example with FTP channel (similar than SFTP) http://wiki.scn.sap.com/wiki/display/XI/SAP+XI+File+Adapter+OS+Command+Line+Feature

Regards

former_member184720
Active Contributor
0 Kudos

You can set the write mode to " use temporary file" in SFTP receiver adapter. However you don't have the flexibility to choose the temp file patterns.

So under target filename you can configure the actual i.e. ".got" and set the write mode to "use temp file"  which way your end system knows that file has been successfully processed.

While the file is being processing by SFTP adapter, it follows the pattern "<timestamp><filename>.tmp".

Once the file is completely transferred it renames to the actual.

Reference :

P.S. thanks for creating the new thread but do close the other thread

former_member217945
Participant
0 Kudos

Hi Harneesh,

Thanks for the reply

I have tried and the file is saving with .tmp format . BUT it should be .got format,

Here iam sending.csv format to receiver folder and after the client has picked up the file from that server it should be renamed as .got file.

Thanks

former_member182412
Active Contributor
0 Kudos

Hi Reddy,

>>>>Here i am sending .csv format to receiver folder and after the client has picked up the file from that server it should be renamed as .got file.

We can't do this from PI side, it must be done by client process after they read the file from the server.

Regards,

Praveen.

former_member184720
Active Contributor
0 Kudos

How do you know that the client has picked/processed the file? Will he be generating another file which says the file has been processed by him?

If you are renaming the file for archiving purpose /for further validations, then create two files i.e. .csv & .got from PI itself

Your client can delete the .csv file as soon as he process it.