Topic "allow synchronize script-command to sync single files"

Author Message
Gottfried Haider

Guest


subject says it all..

I tried, but it does not seem to be implemented atm (error message No such file or directory is a little bit misleading)

Code:
winscp> synchronize local C:\CHANGELOG /home/CHANGELOG
Local 'C:\CHANGELOG' <= Remote '/home/CHANGELOG' <- but no file written
winscp> synchronize local C:\ /home/CHANGELOG
Local 'C:' <= Remote '/home/CHANGELOG'
Error listing directory '/home/CHANGELOG'.
No such file or directory.
Error code: 2
Error message from server: No such file
Request code: 11
(A)bort, (R)etry, (S)kip: Abort


I had a look at DoSynchronizeDirectory in Terminal.cpp, but I don't even have the build environment to try. Let alone understanding the code Wink

This feature would be very handy. I share a Linux box with some other people, and I use WinSCP to sync my subdirectories in /home, and it would be cool to backup some shared stuff in /home too, but without copying the other user's home-dirs (mailboxes et al) Wink

cheers!
gh
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
No it is not implemented, you can synchronise only directories. In GUI you can setup include/exclude mask, what can solve your problem. There's no script command for this. However with some luck you may be able to set the filter in INI file and make the INI file be used for the script session. Example:

Code:
[Configuration\Interface\CopyParam]
ExcludeFileMask=username2;username2

Code:
winscp /console /script=synchronise_script /ini=exclude.ini

Let me know if it helps.

Quote:
(error message No such file or directory is a little bit misleading)

It is result of terrible error reporting of OpenSSH SFTP server.
_________________
Martin Prikryl
Guest




Yeah, I guess that would work..

However, as I want to use this in a automated environment, I'd have to manually change the ExcludeFileMask whenever someone adds a new subdirectory (e.g. when there is a new user). So, I still think that syncing individual files would be a killer feature Wink

gh
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
I'll consider that.
_________________
Martin Prikryl
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