Synchronize script problem with include mask

Advertisement

pumaking
Joined:
Posts:
1

Synchronize script problem with include mask

Hello,

we use WinSCP (4.1.9) to synchronize a local and a remote FTP directory which is working fine so far. Now we got some new subdirectories where we have problems with synchronization. We want to synchronize every file that begins with "irr" in every directory.

The problem is that it doesn't snychronize the files in subdirectories, only in the root directory.

Here's our script:

# Synchronisation Internet<->Lokal Prfberichte
# Automatically answer all prompts negatively not to stall
# the script on errors
option echo on
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# 
option include "irr*; /*"
# Connect
open FTP
# Synchronize
synchronize both "E:\localpath\" /var/www/files/
# Disconnect
close
# Exit WinSCP
exit
I also tried the following with the same result:
option include */irr*
option include irr*
option include */irr*.pdf

It only works if I synchronize the subfolders directly.
What am I doing wrong?

Reply with quote

Advertisement

JanM
Guest

problems with File mask:

I spent hours trying to figure our how the masks are working, but with a very little success. Either they are completely counterintuitive or they are just not working properly.

Here is the problem I am struggling with right now:
I want to only synchronize files in directory \lib\pkp\, so I set File mask to:
\lib\pkp\
This will not find any changes in this directory, but it will report changes in the main directory \.

Any help would be appreciated.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: problems with File mask:

JanM wrote:

Here is the problem I am struggling with right now:
I want to only synchronize files in directory \lib\pkp\, so I set File mask to:
\lib\pkp\
This will not find any changes in this directory, but it will report changes in the main directory \.
For that you do not use file mask (technically speaking, you can, but it's very ineffective). To specify a root of synchronization, use parameters of the synchronize command (or keepuptodate).
_________________
Martin Prikryl

Reply with quote

JanM
Guest

Re: problems with File mask:

Well, that was an example, which doesn't work for me and I need to make it work to do something more complicated. What I want is to synchronize about 20 folders at the same time. I don't want to go to each folder to run synchronization and I don't want to synchronize the root folder, because that takes over 2 minutes (there is like 2000 folders).

martin wrote:

JanM wrote:

Here is the problem I am struggling with right now:
I want to only synchronize files in directory \lib\pkp\, so I set File mask to:
\lib\pkp\
This will not find any changes in this directory, but it will report changes in the main directory \.
For that you do not use file mask (technically speaking, you can, but it's very ineffective). To specify a root of synchronization, use parameters of the synchronize command (or keepuptodate).

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,540
Location:
Prague, Czechia

Re: problems with File mask:

OK, so please post a real-life example (full command).
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum