Hi All,
I've come across a scenario where I've to delete files from SFTP server after certain period.
For Example:
I've uploaded below list files to SFTP server.
Test_19022023.csv
Test_20022023.csv
Test_21022023.csv
Test_22022023.csv
Test_01032023.csv
Test_10032023.csv
Test_20032023.csv
Now, I'm going to upload a new file with Test_21032023.csv
In this case, post successful upload of Test_21032023.csv file, workflow should delete Test_19022023.csv from SFTP server as it has crossed 30 days.
So basically, I want to delete files from SFTP server when it crosses 30 days so that I can maintain only 30 files in SFTP folder.
Please help me with this.
Hi @Shaaz,
Alteryx does not come with a "native" access to SFTP.
For this @chrisha and his team created a nice Connector with the Python SDK https://github.com/SKOPOS-ELEMENTS/SFTPTools_Alteryx
It doesn't contain a direct delete operation, but you could ship around with the "Delete after Download" option if you want to use a nice pre-build connector.
Otherwise you could use some python snippets (e.g. with the lib pysftp) to do the operations on the SFTP server. You can check out this how-to: https://www.datacourses.com/deleting-files-on-sftp-server-2469/
Best regards,
David
User | Count |
---|---|
107 | |
82 | |
72 | |
54 | |
40 |