Topic "Maintain Folder Structure"

Author Message
[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 !
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
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
(it's for download, not upload, but the principle is the same)
Martin Prikryl
[View user's profile]

Joined: 2016-03-16
Posts: 2
Location: UK
ok thank you !

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License