File mask for excluding folders from synchronization

Advertisement

primehalo
Joined:
Posts:
3
Location:
Redding, CA

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?

Description: The synchronization preview window which is still putting checkmarks next to files in the folder I'm trying to ignore.

WinSCP Sync Preview.png

Description: The exclusion file mask filters I'm trying.

WinSCP Sync Filters.png

Reply with quote

Advertisement

pcmedic
Guest

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.

Reply with quote

Advertisement

m_mirshahreza@yahoo.com
Joined:
Posts:
2
Location:
Iran

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

Reply with quote

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?

Reply with quote

Advertisement

m_mirshahreza@yahoo.com
Joined:
Posts:
2
Location:
Iran

Re: Ignore a list of files

martin wrote:

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

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

Reply with quote

Advertisement

You can post new topics in this forum