I'm seeing a discrepancy between the GetList and GetRawList methods. Using GetList I see two files, and GetRawList I see three. I believe this is because two of the files have the same filename on the server.
I've contacted the server owner and told them the duplicate filename behavior isn't very friendly to clients. I'm just curious as to why the GetList method misses the newest of the two same-name files while GetRawList lists everything. If GetList returned everything I probably wouldn't have noticed the server's peculiar behavior.
The server identifies itself as SSH-2.0-WU Transmission SFTP SVR1. I don't know what the actual server software is.
Image of the difference in count:
The missing file is ubpr2.DAT dated Feb 20
Log of activity inside the DonloadFilesByDate method shown above:
2017-02-20 10:53:13.060 INFO Sftp(1)[9] Command: SSH_FXP_OPENDIR (4, '/out')
2017-02-20 10:53:13.099 INFO Sftp(1)[9] Response: SSH_FXP_HANDLE (4, 0x30)
2017-02-20 10:53:13.100 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (5, 0x30)
2017-02-20 10:53:13.142 INFO Sftp(1)[9] Response: SSH_FXP_NAME (5, 3 items)
2017-02-20 10:53:13.145 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (6, 0x30)
2017-02-20 10:53:13.173 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (6, 1, 'EOF reached for Mailbox [/out].')
2017-02-20 10:53:13.174 INFO Sftp(1)[9] Command: SSH_FXP_CLOSE (7, 0x30)
2017-02-20 10:53:13.205 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (7, 0, 'The operation completed')
2017-02-20 10:53:13.882 INFO Sftp(1)[9] Batch: Calling GetItems(string = '/out', TraversalMode = 'Recursive').
2017-02-20 10:53:13.895 DEBUG Sftp(1)[9] Batch: Executing multi-file operation: Listing, source = '/out', target = '', TransferMethod.Copy, MoveMode.All, LinkProcessingMode.FollowLinks, ActionOnExistingFiles.ThrowException.
2017-02-20 10:53:13.897 DEBUG Sftp(1)[9] Batch: Normalizing source path ('/out').
2017-02-20 10:53:13.898 DEBUG Sftp(1)[9] Batch: Checking source path ('/out').
2017-02-20 10:53:13.900 INFO Sftp(1)[9] Command: SSH_FXP_LSTAT (8, '/out')
2017-02-20 10:53:13.940 INFO Sftp(1)[9] Response: SSH_FXP_ATTRS (8)
2017-02-20 10:53:13.942 DEBUG Sftp(1)[9] Batch: Multi-file operation started.
2017-02-20 10:53:13.952 DEBUG Sftp(1)[9] Batch: Retrieving items of directory ('/out').
2017-02-20 10:53:13.953 INFO Sftp(1)[9] Command: SSH_FXP_OPENDIR (9, '/out')
2017-02-20 10:53:14.006 INFO Sftp(1)[9] Response: SSH_FXP_HANDLE (9, 0x31)
2017-02-20 10:53:14.007 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (10, 0x31)
2017-02-20 10:53:14.048 INFO Sftp(1)[9] Response: SSH_FXP_NAME (10, 3 items)
2017-02-20 10:53:14.048 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (11, 0x31)
2017-02-20 10:53:14.076 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (11, 1, 'EOF reached for Mailbox [/out].')
2017-02-20 10:53:14.076 INFO Sftp(1)[9] Command: SSH_FXP_CLOSE (12, 0x31)
2017-02-20 10:53:14.127 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (12, 0, 'The operation completed')
2017-02-20 10:53:14.131 DEBUG Sftp(1)[9] Batch: Multi-file operation done.
2017-02-20 10:53:14.638 INFO Sftp(1)[9] Command: SSH_FXP_OPENDIR (13, '/out')
2017-02-20 10:53:14.676 INFO Sftp(1)[9] Response: SSH_FXP_HANDLE (13, 0x32)
2017-02-20 10:53:14.676 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (14, 0x32)
2017-02-20 10:53:14.731 INFO Sftp(1)[9] Response: SSH_FXP_NAME (14, 3 items)
2017-02-20 10:53:14.733 INFO Sftp(1)[9] Command: SSH_FXP_READDIR (15, 0x32)
2017-02-20 10:53:14.762 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (15, 1, 'EOF reached for Mailbox [/out].')
2017-02-20 10:53:14.762 INFO Sftp(1)[9] Command: SSH_FXP_CLOSE (16, 0x32)
2017-02-20 10:53:14.791 INFO Sftp(1)[9] Response: SSH_FXP_STATUS (16, 0, 'The operation completed')