Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Delete directory recursively

There's no official way.
Added to tracker:
https://winscp.net/tracker/887

You may achieve that with Session.ExecuteCommand. But the solution is protocol-dependent. I do not know, what protocol you are using. If FTP (seems so from RD command), there's probably no way.
oli001

Delete directory recursively

Hi,

how can I delete a directory recursively?
with session.executeCommand("RD ....") I cant't delete folders that are not empty.
is the only possibility wirting a recursive function that removes all files and then deleting directories?

Thank you,

Oli