Skipping files based on their names

The <SyncFileMask> element allows you to ignore files during synchronization based on a character string in the filename (including the file extension).

The default configuration is to not skip any files based on their name. There can be only one <SyncFileMask> element in the configuration file, but you can use regular expressions (regexes) to define complex text patterns, which gives you a lot of flexibility in specifying the files to skip in synchronizations.

Note: Complex regex patterns slow down the files pass of synchronization.

To create the mask defining the character string that identifies the files to ignore during synchronization, use the following syntax:

Character Meaning
\ Treat the next character as a literal
^ Begins with
$ Ends with

The <SyncFileMask> element supports POSIX regular expressions, so you can use AND (&) and OR (|) operators to create your mask.

Here are some simple masks to ignore files with names that:

begin with "."

The ".", which usually means any character, here means the "." (dot) character, because it's preceeded by a "\".

contain "w"
end with "roy"
begin with a "." (dot) character or end with ".mp3".
match "Recycle Bin"
<SyncFileMask>^Recycle Bin$</SyncFileMask>
Note: If you create a file mask with multiple operators, be sure that you don't configure mm-sync to ignore certain files that you want synchronized.