Re: Solution
@mjhillman: Yes, that's correct and by design.
/* then all the files will be downloaded but the folder will be removed along with the files.
outgoing all the files are removed (expected) and the outgoing directory is deleted (unexpected).
transferResult = session.GetFiles(ftpDirectory, dataDir, true, transferOptions);
. 2016-02-01 12:35:55.053 File: '/fpl/outgoing/paid_20160129_1159.txt' [2016-01-29T16:59:14.000Z] [2]
. 2016-02-01 12:35:55.054 Copying "/fpl/outgoing/paid_20160129_1159.txt" to local directory started.
. 2016-02-01 12:35:55.054 Binary transfer mode selected.
. 2016-02-01 12:35:55.054 Opening remote file.
> 2016-02-01 12:35:55.054 Type: SSH_FXP_OPEN, Size: 53, Number: 40963
< 2016-02-01 12:35:55.093 Type: SSH_FXP_HANDLE, Size: 19, Number: 40963
> 2016-02-01 12:35:55.094 Type: SSH_FXP_FSTAT, Size: 19, Number: 41224
< 2016-02-01 12:35:55.132 Type: SSH_FXP_ATTRS, Size: 29, Number: 41224
> 2016-02-01 12:35:55.133 Type: SSH_FXP_READ, Size: 31, Number: 41477
< 2016-02-01 12:35:55.213 Status code: 1
. 2016-02-01 12:35:55.213 3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2016-02-01 12:35:55.213 Type: SSH_FXP_CLOSE, Size: 19, Number: 41988
. 2016-02-01 12:35:55.213 Preserving timestamp [2016-01-29T16:59:14.000Z]
. 2016-02-01 12:35:55.214 Deleting file "/fpl/outgoing/paid_20160129_1159.txt".
> 2016-02-01 12:35:55.214 Type: SSH_FXP_REMOVE, Size: 45, Number: 42253
< 2016-02-01 12:35:55.273 Type: SSH_FXP_STATUS, Size: 30, Number: 41988
. 2016-02-01 12:35:55.273 Discarding reserved response
< 2016-02-01 12:35:55.313 Type: SSH_FXP_STATUS, Size: 29, Number: 42253
< 2016-02-01 12:35:55.313 Status code: 0
. 2016-02-01 12:35:55.313 Deleting file "/fpl/outgoing".
> 2016-02-01 12:35:55.313 Type: SSH_FXP_RMDIR, Size: 22, Number: 42511
< 2016-02-01 12:35:55.367 Type: SSH_FXP_STATUS, Size: 34, Number: 42511
< 2016-02-01 12:35:55.367 Status code: 0
> 2016-02-01 12:35:55.522 Script: exit
. 2016-02-01 12:35:55.522 Script: Exit code: 0
. 2016-02-01 12:35:55.522 Closing connection.
. 2016-02-01 12:35:55.522 Sending special code: 12
. 2016-02-01 12:35:55.522 Sent EOF message