Iterate through subfolders.

Dec 21, 2011 at 4:39 PM

Cosmin,

Thank you for the great tool and it works as documented.

I like to ask if it's possible to get all files in all the subfolders of the root folder?  Can the tool iterate all the remote subfolders if the RemotePath has the value like "/*/*.txt"?

I am looking forward to your suggestions and I appreciate your great work.

Regards,
Wan

Coordinator
Dec 21, 2011 at 8:54 PM

Hi Wan,

      First of all, thank you for your appreciations. Secondly, yes, your idea it's feasible... That involves some changes but it will be a great feature too. I will let you know once I'll release a new version, that can be in the next days or a little bit latter, kind of 2 weeks from now.

Thank you again.

Best regards,
Cosmin

Dec 21, 2011 at 8:58 PM

Cosmin,

Thanks for the information and looking forward to the update.

And another idea is an option to delete the remote file when it's done transferring.  Hopefully this is a great feature and not too difficult to implement.

Regards,
Wan

Coordinator
Dec 21, 2011 at 9:01 PM

Wan,

          I noted, in fact, we can call it "Move the file" or something like that.

          Thanks again for this idea too.

Regards,
Cosmin

Dec 21, 2011 at 9:08 PM

Cosmin,

Yes, that's perfect.  I am looking forward to the next update.

Regards,
Wan

Jan 4, 2012 at 8:38 PM

Cosmin,

Happy New Year.. I don't mean to rush you, but do you have any update on these new features?

Regards
Wan

Coordinator
Jan 9, 2012 at 11:07 PM

Hi Wan and Happy New Year,

             I just got back from vacation (sorry for the delayed answer).  So, I am planning a new version for the end of this month...

Best regards,
Cosmin

Jan 19, 2012 at 6:16 PM

Hi Cosmin,

I hope you had a wonderful new year and vacation.  I am just touching base about the update.

And I've run into an issue with this tool on our test server.  On the test server, I am getting null object reference when all the files are copied over to local machine.  Do you know what could be an issue and how could I debug this?

Regards
Wan

Coordinator
Jan 19, 2012 at 9:11 PM

Hi Wan, 

Did you use the last check-in? If yes, please consider that is not working, because I didn't test what I've checked-in! 

Right know I'm testing this feature, plus the feature that you request for a path like "/test/t*/files*.*".... It's difficult to test a mask like this because the scenarios are very very rich. 

Keep in touch and I let you know when I will donne.

Thank you for your interest & participation!

Best Regards, 

Cosmin

Jan 19, 2012 at 11:16 PM

Cosmin,

I am not using the latest checked in.  It's the version 1.5 stable.

I am looking forward to the next update.

Thanks
Wan

May 7, 2013 at 4:27 PM
Edited May 7, 2013 at 4:40 PM
Hi cosminfr

First of all great tool!
Very well documented and easy to get into work.

This functionality that MagicFox suggested would be a great addition to the component.
Is this to be released any soon?

As you stated "there's no easy way to do this because the scenarios are very very rich"

So I think that an intermediate release that allowed to get the folders list would be of great help.
With folder listing one can recursively populate a list an then use that list to iterate through all folders...

In this component you already have a "Get Files List From The Remote Folder" option so the idea was to create another option called "Get Folders List From The Remote Folder" witch would behave like the one that already exists but returning folders instead of files.

Do you think this is easy to implement and release?

EDIT:
Also with that functionality you can have:
one check box stating "Search sub folders"
One combo/text box stating something like "Sub-Folder deepness" with values {0,1,2,3...}
A value of 1 means that listing will only have the current folder sub-folders
A Value of 2 means that listing will only have the current folder sub-folders and all sub-folders of the sub-folders
... and so on ...
A value of 0 means that sub-folder listing will occur to the deepest folder.

This can be achieved by recursively using the get folder functionality.
Coordinator
May 10, 2013 at 9:48 AM
Hi,
Thank you a lot for your appreciations. I will try to do all my best on the next period... I cannot promise a release day, but anyway I'll start to do the devs. Thank you for your valuable features proposal, I will keep in mind and I hope I will release a new version in the next couple of days. 
Thank you again and best regards,
Cosmin
May 17, 2013 at 10:38 AM
Hi cosminfr.

I decided to download the source code and take a chance...
And I think I got it :)

I've added the controls to the form, changed the code in order to perform as I mentioned above.
I did it in 2 steps:
  1. Add the ability to get the folders list to the control
  2. Add the ability to recursively "dig deep" into the folder structure returning either the folder structure or the structure up to a certain level.
Step 1. was as easy as 1,2,3 :)

Step 2 was a little bit trickier... But I thin I got it:
  • for the user interface
    store the selections of the controls into variables which are then saved to a xml document.
    If there are values on that document load them into the controls; if not load defaults.
    Implement the behave of the controls (enable the depth control if SearchSubFolders is checked or disable it otherwise)
  • now for the "dig deep" into the folder structure
    I implemented it directly in Sftp.cs.
    I changed a little the
public List<string> GetDirectoryList(string path)
placing a validation for the SearchSubFolders after we get the folders of that path.
Then I implemented a recursive routine (which is called on the routine above if the SearchSubFolders is checked) that recursively gets the folders list, validates if the user wants to go deeper and if so it goes.

Now, I was able to compile all this, build the solution but now I'm unable to test it under SSIS :S
I get an error saing I'm not allowed to use that component on this computer...
problems with registering it with gacutil?
Well I'm doing it as i did it on step one. Nothing different. And step one worked as a charm.

So if you could give me a hand i wold be thankful...

Also if you want me to collaborate on the project please let me know.
Don't have much time but at least for this part of the project I've already done much of the work.
Coordinator
May 17, 2013 at 1:38 PM
Hi,
 I already implementated this feature... you will can obtain the forder tree based on a depth and a file pattern. The source tree structure will be replicated on destination, etc... but I didn't realeased it beacause I want to do some tests. In fact, I'm very very busy with my professional and personal activities and effectivly I don't know yet the release date. But I think... till the end of the month will be fine. 

 In your case, the documentation page starts by these words:
Please consider this Post-build event
path "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin"
gacutil /uf "SSISSFTPTask100"
del "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\SSISSFTPTask100.dll"
copy $(TargetPath) "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\"
gacutil -i $(TargetPath)

So, you have to copy the dll to C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\ and then you have to register your dll into GAC...

Regards,
Cosmin