Topic "Synchronize script problem with include mask"

Author Message
pumaking
[View user's profile]

Joined: 2009-05-06
Posts: 1
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:

Code:

# 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?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Use:
*/; irr*
See documentation.
_________________
Martin Prikryl
JanM

Guest


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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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
JanM

Guest


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).

prikryl 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).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
OK, so please post a real-life example (full command).
_________________
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