Page 1 of 1

MakeDirectory problem

Posted: Tue 19 Jul 2011 15:37
by Kupe3
if i try to create /folderA/folderB and folderA doesnt exist, i get error.
How can i create such folder?

if directory exists (folderA) and i try create it i get error

i tried to check if a folder exists using CheckFile (i couldnt fine CheckDirectory or such method) but it gives me error when i try to find if /folderA exists.

Any thoughts how can i solve this?

thanks

i forgot to mention this is related to SFTP component

Posted: Tue 19 Jul 2011 15:38
by Kupe3
i forgot to mention this is related to SFTP component

Posted: Fri 22 Jul 2011 08:43
by Dimon
The possibility to create /folderA/folderB depends on your SFTP server, but most SFTP servers don't provide it.
You can check if the directory exists using the TScSFTPClient.OpenDirectory method. If the directory doesn't exist, this method will raise the corresponding error.
There is no other way to check if a directory exists using SFTP protocol.