Move files dropped on an FTP to a local folder without deleting the FTP folders.
I would like to retrieve files deposited from the separate folders of a SFTP and then delete them but keeping the tree (different access rights depending on the users).
I used "session.GetFiles" with "transferOptions.FileMask" but I can not get what I want with it.
Depending on the settings either there is an error in the script or there is no error but nothing has been moved:
// Download files TransferOptions TransferOptions = new TransferOptions(); TransferOptions.TransferMode = TransferMode.Binary; TransferOptions.FileMask = "*.zip"; TransferOperationResult transferResult = session.GetFiles( "/*", @Dts.Variables["$Project::PROP_FilePath"].Value.ToString(), true, TransferOptions);
I have also tried using "session.QueryReceived" to override errors (folders are protected and can not be deleted).
But I can not even integrate it into the script without a compilation error (I'm not a developer and I just started SSIS :)).
Can someone help me?
Thanks in advance.
PS: excuse my english, i'm french :)