Topic "Delete directory recursively"

Author Message
[View user's profile]

Joined: 2012-07-18
Posts: 3

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,

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
There's no official way.
Added to tracker:

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.
Martin Prikryl

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License