Delete remote folders\files

Advertisement

Quim
Guest

Delete remote folders\files

Hi,

I'm trying to download from FTP site to a local path all folders and files and then delete all, but I don't know how do to delete remote folders. I'm using the next command:

synchronize local "C:\temp"
rm *.*
rmdir * '<< Incorret command

This script fails because says it can delete folders (obviusly). Can I use rmdir to delete all folders?
How I can delete all of them?

Thanks a lot,

Best regards

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,227
Location:
Prague, Czechia

Re: Delete remote folders\files

There's no command to delete all folders. The rmdir command does not accept file masks.
You can list the folders and remove them one by one.
For that, easier than using scripting interface directly would be to use WinSCP .NET assembly:
https://winscp.net/eng/docs/library
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum