SFTP Recursive Delete

+1 vote
asked May 18, 2011 by jepoy (450 points)
edited Mar 13, 2012

Hello Guys,

Any idea how to perform delete all files inside particular remote server using sftp?
/server/uploaded/a1.txt
/server/uploaded/a1.html
/server/uploaded/a1.zip

i tried deletefile("/server/upload/.") i am getting an error: no such file exception

Applies to: Rebex SFTP

1 Answer

+1 vote
answered May 19, 2011 by Lukas Matyska (54,470 points)
edited Mar 13, 2012
 
Best answer

UPDATE: Support for recursive (multi-file) delete was added in Release 2012 R1.

Batch (multiple) delete is not supported yet, but you can do it using current API as described at this post.

commented May 19, 2011 by jepoy (450 points)
edited May 19, 2011

Just as I thought hehehe.... I updated my code and follow the logic in the specified link. Thanks a lot...

...