Topic "Sync directory tree to single dir?"

Author Message
kleach
[View user's profile]

Joined: 2009-10-06
Posts: 6
Is there a way I can sync a whole directory tree into one directory on the remote site?

-Ken
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Sync or copy (upload)?
redlav
[View user's profile]

Joined: 2015-07-31
Posts: 3
Location: Germany
Hello, I have coincidentally the same problem.

I have created a folder structure that is used for better overview.
Changes to files (change / delete / new) are to be synced in a single
directorie for further processing in this structure.

regards redlav
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
Again, sync or plain copy (upload)?
redlav
[View user's profile]

Joined: 2015-07-31
Posts: 3
Location: Germany
prikryl wrote:
Again, sync or plain copy (upload)?


Hi,

the transfer will take place in Sync mode. All changes should be applied to the target directory. In other words, no longer existing files in the source will be deleted from the target.

Thank you very much for your efforts.

regards redlav
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
No WinSCP cannot do this automatically.
Though scripting this in a PowerShell using WinSCP .NET assembly won't be that difficult.
redlav
[View user's profile]

Joined: 2015-07-31
Posts: 3
Location: Germany
I have no idea how I could solve the problem with .NET.
Is there a code example where I could get my bearings?

regards redlav
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
You can start with this example:
https://winscp.net/eng/docs/library_example_recursive_download_custom_error_handling

Modify it to download the files to a fixed folder in session.GetFiles call.
Guest




redlav wrote:
I have no idea how I could solve the problem with .NET.
Is there a code example where I could get my bearings?

regards redlav


Hi redlav, did you get it to work?
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