Directory Transfer: Multiple file mask

Advertisement

Andres
Guest

Directory Transfer: Multiple file mask

Hi guys. Thanks for this awesome library :) its helping a lot.

Im working with VS2015 c# and I have following code.

// Upload files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = tmde;
transferOptions.FileMask = jsonConfig.files_mask; // that will contain "*.jpg;|*/"; 

 SynchronizationResult syncResult = session.SynchronizeDirectories(SynchronizationMode.Remote,
                                                                jsonConfig.local_path,
                                                                jsonConfig.remote_path,
                                                                false,
                                                                false,
                                                                SynchronizationCriteria.None,
                                                                transferOptions);

But sadly it works only with the last or only one file mask.
Is there any way to add more than one?


Thanks in advance.

Reply with quote

Andres
Guest

Thanks Martin, now I get it.

If anyone is interested, This make the trick to filter by file type and exclude sub folders:
*.jpg |  */

For instance:
transferOptions.FileMask = jsonConfig.files_mask + " | */";
[/code]

Reply with quote

Advertisement

You can post new topics in this forum