Delete a selected file off ftp server using WinSCP session m

Advertisement

Guest

Delete a selected file off ftp server using WinSCP session m

Hi guys,

I have now developed my site to enable users to upload a file and download a file from an FTP site using SFTP.

Before I download a file, I have added functionality to enable to the users to view the entire FTP directory on the screen in the form of a check box list.

Is there a way to allow users to delete a file using WinSCP session methods at all? So they click on a button that gets a list of all files residing on the FTP site...they can then click on a file and delete it from the FTP site.

Many thanks,

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,234
Location:
Prague, Czechia

Re: Delete a selected file off ftp server using WinSCP session m

Not sure I understand.
But if you want to automate deleting files, use either script command "rm":
https://winscp.net/eng/docs/scripting
https://winscp.net/eng/docs/scriptcommand_rm

Or .NET assembly method Session.RemoveFiles:
https://winscp.net/eng/docs/library
https://winscp.net/eng/docs/library_session_removefiles
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum