Hi,
I cannot delete a folder full of file and folder. What should I do?
Command;
oSFTPClient.RemoveDirectory('/etc/test');
Error;
Project Project1.exe raised exception class EScSFTPError with message 'SFTP server error occurred: Failure'.
RemoveDirectory - SFTP server error occurred: Failure
-
- Posts: 18
- Joined: Mon 28 Nov 2011 18:04
- Location: Türkiye
Re: RemoveDirectory - SFTP server error occurred: Failure
Most likely your SFTP server does not allow removing an empty directory. Then, to solve the issue, you should clear the directory before calling the RemoveDirectory method.
-
- Posts: 18
- Joined: Mon 28 Nov 2011 18:04
- Location: Türkiye
Re: RemoveDirectory - SFTP server error occurred: Failure
I can not delete the full folder via winscp and I do not get any errors. but I get this error when I delete the full folder with the command RemoveDirectory in SecureBridge component. I delete everything in the folder but it deletes the empty folder. I need you to have a code like the one below.
RemoveDirectory(folder:string;allfiles:boolean)
RemoveDirectory(folder:string;allfiles:boolean)
Re: RemoveDirectory - SFTP server error occurred: Failure
The TScSFTPClient component executes SFTP protocol commands and generates an error if the server returns an error when executing a command. This is correct behavior of our component. To solve the task, you should implement this functionality by yourself.