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

martin

Re: Ignore a list of files

@m_mirshahreza: Sorry, still not clear. How does the Mask option limit you? You can list your files there.
m_mirshahreza@yahoo.com

Re: Ignore a list of files

In fact the main question is:
How can I exclude files from SynchronizeDirectories based on my manual files list not mask option?
Guest

New option needed

Hi again
I have this line of code:
var r = session.SynchronizeDirectories(
    WinSCP.SynchronizationMode.Remote,
    HostingUtils.GetHostRootDirectory().FullName, remotePath, false);

I need a new option for this method to ignore (exclude) some files. I know about the Mask option but it is enough for my scenario. I need to exclude some files manually by my rules.
Is it clear?
martin

Re: Ignore a list of files

@m_mirshahreza: I'm sorry, but I do not understand you. What option are you missing?
m_mirshahreza@yahoo.com

Ignore a list of files

Hi
I am using WinSCP APIs via C# code.
I want to ignore some files without FileMask option, but there is not any options for it.
The problem is when I use the SynchronizeDirectories method it usesWinSCP.SynchronizationCriteria.Time (or other options) that needs to read remote file info, that is very slow. I have some log files in my context that tells me which file must not upload and it will be very fast because it does not need to remote checking.
So it seems we need this option (option to ignoring a list of files) avoiding long time synchronizations.
Thanks
pcmedic

Directory/File mask

I have a local directory D:\FTP\User\Outgoing that contains a subfolder Archive (D:\FTP\User\Outgoing\Archive) and 2 files, a .txt and a .flg

I am running WinSCP a the command line with a command file. I change into the outgoing directory and I just want to upload the .txt and .flg but when I say put *.*, the Archive directory is included. I am confused on how to exclude the Archive directory.
primehalo

Thank you! That one worked!

I went over https://winscp.net/eng/docs/file_mask#path several times trying to figure why forum/files/ wasn't working. Looking at it again, it is still not clear why */forum/files/ works and forum/files/ does not.
primehalo

File mask for excluding folders from synchronization

I'm running WinSCP 5.1.0 (Build 2625) on Windows 7 64-bit.

On a synchronization between local folders and a server I am trying to get it to ignore the directory "forum/files/", as in I don't want it to sync any files or folders that are in that directory. I have tried adding these filters to the file mask but it doesn't seem to be working:
| forum/files/*; forum/files/; forum/files*/; forum/files*/*/

Can someone please help me find the correct file mask to exclude "forum/files/" from synchronization?