allow synchronize script-command to sync single files

Advertisement

Gottfried Haider
Guest

allow synchronize script-command to sync single files

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)

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Re: allow synchronize script-command to sync single files

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:

[Configuration\Interface\CopyParam]
ExcludeFileMask=username2;username2
winscp /console /script=synchronise_script /ini=exclude.ini
Let me know if it helps.

(error message No such file or directory is a little bit misleading)
It is result of terrible error reporting of OpenSSH SFTP server.

Reply with quote

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

Reply with quote

Advertisement

You can post new topics in this forum