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

Author Message
loriechevalier

Guest


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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
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

Guest


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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
This is the correct way:

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

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License