Topic "Maintain Folder Structure"

Author Message
cnoffki
[View user's profile]

Joined: 2016-03-16
Posts: 2
Location: UK
I have a local folder structure, from which I'm uploading files to a remote server using .Protocol = Protocol.Scp

I would like to maintain the local folder structure and just upload the files and delete them (the files, not the folders) when done.

I'm running a VB.NET console app, and my put files is the following :

transferResult = session.PutFiles("D:\remindererrors\", "remindererrors/", True, transferOptions)

I've tried several cominbinations of \, \* but it always seems to delete the local folders....Can anyone help with the correct syntax ?

Thanks !
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
There's no way to have WinSCP do this for you automatically.

You have to manually recurse the local tree and move the files one by one.

See this example http://winscp.net/eng/docs/library_example_recursive_download_custom_error_handling
(it's for download, not upload, but the principle is the same)
_________________
Martin Prikryl
cnoffki
[View user's profile]

Joined: 2016-03-16
Posts: 2
Location: UK
ok thank you !
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