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.