Topic "Directory Deleted Unexpectly During GetFiles"

Author Message
mjhillman
[View user's profile]

Joined: 2016-01-29
Posts: 2
Location: New Jersey
When getting files from directory "outgoing" all the files are removed (expected) and the "outgoing" directory is deleted (unexpected).

transferResult = session.GetFiles(ftpDirectory, dataDir, true, transferOptions);

Is this the normal behavior?

I am executing this code in an SSIS script.

Thanks.
Mike

. 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
mjhillman
[View user's profile]

Joined: 2016-01-29
Posts: 2
Location: New Jersey
if the ftp directory ends without the "/*" then all the files will be downloaded but the folder will be removed along with the files.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
mjhillman wrote:
if the ftp directory ends without the "/*" then all the files will be downloaded but the folder will be removed along with the files.

Yes, that's correct and by design.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License