Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: How to transfer multiple file types

Jovy wrote:

I've succeeded to transfer one file type but how do I code it in script and batch file? For instance I need to transfer both csv and txt file? How should I append it.

It would help, if you show us your current code.
Until you do, I can only point you to the documentation:
https://winscp.net/eng/docs/file_mask#combining
Jovy

How to transfer multiple file types

Hi,

I've succeeded to transfer one file type but how do I code it in script and batch file? For instance I need to transfer both csv and txt file? How should I append it.
Andres

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]
martin

Re: Directory Transfer: Multiple file mask

I'm not sure I understand the question.

If you want more masks, just separate them with a semicolon, like *.jpg;*.png;*.gif | */
https://winscp.net/eng/docs/file_mask#combining
Andres

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.