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: SSIS 2012 TransferOptions.FileMask causing exception has been thrown by the target of an invocation

This is the correct way:

lTransferOptions = "| RSCH-*.zip";
loriechevalier

Re: SSIS 2012 TransferOptions.FileMask causing exception has been thrown by the target of an invocation

Thank you for the reply. Actually this filemask now works (some weirdness going on there). I now need to add an exclusion filemask

Would this be the correct way to exclude any files with the name of RSCH-*.zip?

TransferOptions lTransferOptions = new TransferOptions();
lTransferOptions = | "RSCH-*.zip";
TransferOperationResult lTransferResult = lSession.GetFiles(remotePath, localPath, false, lTransferOptions);
lTransferResult.Check();

Thanks much,
Lorie
martin

Re: SSIS 2012 TransferOptions.FileMask causing exception has been thrown by the target of an invocation

The exception must have an inner exception with more details.

Or attach a session log file.

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
loriechevalier

SSIS 2012 TransferOptions.FileMask causing exception has been thrown by the target of an invocation

Everything works great until I add the filemask...Once I do, I get an exception has been thrown by the target of an invocation...Could you please tell me what I'm doing wrong?

TransferOptions lTransferOptions = new TransferOptions();
lTransferOptions.FileMask = "LOR*.zip" ;
TransferOperationResult lTransferResult = lSession.GetFiles(remotePath, localPath, false, lTransferOptions);
lTransferResult.Check();

Thank you