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

Advertisement

loriechevalier
Guest

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

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.

Reply with quote

loriechevalier
Guest

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

Reply with quote

martin
Site Admin
martin avatar

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

This is the correct way:

lTransferOptions = "| RSCH-*.zip";

Reply with quote

Advertisement

You can post new topics in this forum