Skipping files based on their names

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

The default behavior is to not skip any files based on name. There can be only one <SyncFileMask> element in the configuration file but you can use regular expressions (regexes) to define complex text patterns. This gives you much flexibility in specifying the files to skip in synchronizations, but you should note that complex regex patterns slow down the files pass.

To create the mask with the character string that identifies the files to ignore, 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 "."
<SyncFileMask>^\.</SyncFileMask>
The “.”, which usually means any character, here means the dot (.) character because it's preceeded by a backslash (\).
contain "w"
<SyncFileMask>w</SyncFileMask>
end with "roy"
<SyncFileMask>roy$</SyncFileMask>
begin with a "." (dot) character or end with ".mp3".
<SyncFileMask>(^\.)|(\.mp3$)</SyncFileMask>
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.