exculding a file or directory in c#
I am using synchronisation from linux to windows thruogh c# code. The problem i am facing is some files names in linux are not supported in windows. this synchronisation stucks when it get to such files name which is not supported in windows. Now i want to exclude those directories and file names. Can any one please help me.
string path = Server.MapPath("~/Data/");
// Connect
session.Open(sessionOptions);
// Synchronize files
SynchronizationResult synchronizationResult;
synchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, path, "//fdr/mydat/msgfolder", false);
// Throw on any error
synchronizationResult.Check();
string path = Server.MapPath("~/Data/");
// Connect
session.Open(sessionOptions);
// Synchronize files
SynchronizationResult synchronizationResult;
synchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, path, "//fdr/mydat/msgfolder", false);
// Throw on any error
synchronizationResult.Check();