|
I am trying to download multiple files from the SFTP server. I am having trouble with the GetFiles() Method, where it works in some instances, but not in others. I Have a main directory, for example Lets call it Main, and it has 3 subdirectories under it, Dir1,Dir2 and Dir3. Each of those subdirectories have .dat files in them. The following command is NOT downloading any of the .dat files: client.GetFiles("/Main/*.dat", "c:\temp", SftpBatchTransferOptions.Recursive) The following commnand IS downloading the .dat files (only from Dir1): client.GetFiles("/Main/Dir1/*.dat", "c:\temp", SftpBatchTransferOptions.Recursive) Why isnt the first example not getting any of the .dat files from any of the subdirectories. It does not seem like the recursive option is working properly? I even tried using the SFTP Batch Transfer Sample provided with the download, with the same results. |
|
Try using
I tried using the Xcopy mode, it copies all of the folders as well, is there an option to only download the files?
(22 Oct '10, 12:29)
Terry
This is a known limitation of this mode. Would you like to download all the files into a single folder? It looks like some kind of an ability to change the suggested target path for each item would be helpful. We will consider this for one of the next releases. In the meantime, the recommended workaround is to iterate through the downloaded directory tree, move all files to their desired location and remove unwanted directories.
(25 Oct '10, 11:49)
Lukas Pokorny ♦♦
Yes, I would like for it to download to a single folder.
(26 Oct '10, 14:08)
Terry
|