Hi all,
I was wondering if anyone has come up with a solution to be able to delete specific files from an sftp site? It is our own internal FTP server and unfortunately the api is very limited and so does not allow us to connect via HTTP request.
Thanks
Delete specific files from SFTP
Re: Delete specific files from SFTP
You'll need to call an external script or command line tool to accomplish this.
There has been a similar discussion in the past:
viewtopic.php?f=11&t=92
(I haven't tried this myself, I just remembered the old topics)
There has been a similar discussion in the past:
viewtopic.php?f=11&t=92
(I haven't tried this myself, I just remembered the old topics)
Re: Delete specific files from SFTP
That's great cheers.
Sticking with this topic.
Is it possible to rename folders or change a folder structure once it has been uploaded onto the FTP server?
My thinking was if I uploaded a folder containing a file eg //TEST/file1.pdf and then further down the line I could either rename that folder to //TEST_DELETE/file1.pdf or add a new folder //DELETE/TEST/file1.pdf that way when i used FTP receive I could grab folders named DELETE or TEST_DELETE.
Sticking with this topic.
Is it possible to rename folders or change a folder structure once it has been uploaded onto the FTP server?
My thinking was if I uploaded a folder containing a file eg //TEST/file1.pdf and then further down the line I could either rename that folder to //TEST_DELETE/file1.pdf or add a new folder //DELETE/TEST/file1.pdf that way when i used FTP receive I could grab folders named DELETE or TEST_DELETE.
Re: Delete specific files from SFTP
Using default Switch tools the only way to rename a folder on an FTP server is to:
- Download the folder from the FTP
- Rename it
- Upload it again to the FTP
If you want to rename the folder on the FTP itself, then you need an external script or command line tool which is able to rename the FTP folder. This external script or command line tool can then be automated in Switch via the Execute Command Tool or a Switch Script.
- Download the folder from the FTP
- Rename it
- Upload it again to the FTP
If you want to rename the folder on the FTP itself, then you need an external script or command line tool which is able to rename the FTP folder. This external script or command line tool can then be automated in Switch via the Execute Command Tool or a Switch Script.