"option exclude" with list of directories

Advertisement

dtgriscom
Joined:
Posts:
13
Location:
Wakefield, MA

"option exclude" with list of directories

I'm writing a batch file to synchronize a server directory with a local directory. However, there are a set of subdirectories that I want WinSCP to ignore.

Easy: just set up an "option exclude" line that lists all the ignored directories, separated by semicolons, right? Well, it doesn't work for me. Here's the script:

option batch on
option confirm off
option transfer binary
option synchdelete on
option exclude "C:\TopDir\GFLogs\*;C:\TopDir\PostgreSQL\*;C:\TopDir\Apache\*;C:\TopDir\PHP5\*"
open xxxxxx:yyyyyyy@zzzzzzz.com
synchronize local C:\TopDir /home/dang/working/TopDir

As far as I can tell, this has no effect on WinSCP; when the batch file is run, WinSCP starts right into updating C:\TopDir\Apache\* to match /home/dang/working/TopDir/Apache/*.

How can I handle this? I'd rather not separately list the subdirectories to be synchronized, as new ones get added from time to time and the new ones need to automatically synchronize.

Thanks,
Dan

Reply with quote E-mail

Advertisement

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

Re: "option exclude" with list of directories

You are synchronizing remote directory into local one. Hence you must exclude the remote directories (being source), not the local ones.

Reply with quote

dtgriscom

That makes sense, but brings up another question: if I've got "option synchdelete on" included, that deletes any files in the target directory tree that don't match a file in the source directory tree. If I (successfully) exclude a source directory, does that mean that any corresponding directory on the target machine will get deleted?

Reply with quote E-mail

suraj
Guest

List Files with excluding some pattern of file

hi,
is there any option in ls command so that it exclude a particular pattern of file from listing

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum