cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BODS SFTP delete after transfer

0 Kudos

When using file locations and downloading a file via SFTP protocol, there is no option to delete the file after transfer. When creating a flat file object and setting the location to a File Locations object, setting the "Delete file after transfer" to yes only deletes the downloaded copy once it's done being processed. It does not delete the file on the SFTP server. Is there a way to utilize the File Location object in order to delete the file on the SFTP server? You can shell out, but then you would have 2 locations where SFTP connection information is being stored.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member466847
Active Participant
0 Kudos

Hello,
Here is a listing of where the various Delete file from commands and the different protocols.

https://help.sap.com/viewer/e54136ab6a4a43e6a370265bf0a2d744/latest/en-US/1489b7390fb2426c89936db9c5...

There is also the File_delete function that can remove the local file with the direct file path declared.

https://help.sap.com/viewer/8092b085a68941f6aaa6708685a62b0d/latest/en-US/79179ad8e8984b60bae29055d3...

However, i recall from similar incident, to delete from the sftp source you will need to create a custom script that will connect to the sftp location and delete the file after the dataflow is completed.