Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

suraj

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
martin

It will. But you can exclude also the remote directories to avoid that.
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?
martin

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

"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