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: FileMask with session.PutFiles()

John Thomas wrote:

Does the same Filemask syntax apply to session.PutfFiles also?

I need to transfer all the files in a directory without including any sub directories and delete source files on successful transfer.
Will the following code work?

TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.FileMask = "*.*| */";

session.PutFiles(source\*, target, true, transferOptions);

Your code looks good. Any problems?
John Thomas

FileMask with session.PutFiles()

Does the same Filemask syntax apply to session.PutfFiles also?

I need to transfer all the files in a directory without including any sub directories and delete source files on successful transfer.
Will the following code work?

TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
transferOptions.FileMask = "*.*| */";

session.PutFiles(source\*, target, true, transferOptions);
3K

Thank you. :D
3K

Synchronize -filemask in .NET Assembly?

Hi, what is the equivalent scripting command of filemask in .NET Assembly as shown below?

Script:
synchronize -filemask="*.doc*<2012-02-01; *.ppt*<2012-02-01" local "C:\TEST\docs" "/docs"

In .NET assembly, what will be the filemask command?
synchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, @"C:\TEST\docs", "/docs", false);

Thank you.