Topic "How to creating directories on remote sftp server by using com library"

Author Message
mrstone
[View user's profile]

Joined: 2015-09-04
Posts: 2
Location: 377-53,Shindang dong, Jung-Gu, Seoul, Korea
Hello !!

I want to create directories - "/home/123/456/789/"


but, when remote server Root directory is "/" and current conneted directory is "/", session.CreateDirectoy("/home/123/456/789/") is Error !!

and, when remote server Root directory is "/" and current conneted directory is "/", if directory "/123" is exist then session.CreateDirectoy("/123") is Error !!

when remote server Root directory is "/" and current conneted directory is "/", If I want to creating directories - "/home/123/456/789/" then How to useing com library ??? Crying or Very sad
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
There's no way to create a recursive remote path in one call.
If you do not even know what path components exists in advance, you have to iterate the components one by one, testing their existence (.FileExists) and create if they do not.
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