Topic "Delete directory recursively"

Author Message
oli001
[View user's profile]

Joined: 2012-07-18
Posts: 3
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
There's no official way.
Added to tracker:
https://winscp.net/tracker/show_bug.cgi?id=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.
_________________
Martin Prikryl
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License