Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: Code and Log

Hi Mate,
I think you are right. I have tried to download the file using Filezilla and still the same result. The file is automatically removed from server.
Thanks for your help.

Re: Code and Log

I'm pretty sure WinSCP does not delete the file. Can you attach also a session log file?

There's probably some process/hook on the server that causes the server to delete the file when it is downloaded. Did you try to download the file in WinSCP GUI or any other SFTP client?

Code and Log

Hi Martin,

Thanks for your response.
I have attached the code and debug files.

Awaiting your response.


Re: session.GetFiles removing file from server automatically

Please show us your code and attach a full debug log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.DebugLogPath. Submit the log with your post as an attachment. You may want to remove data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

session.GetFiles removing file from server automatically

Hi All,
I am using session.GetFiles method ( without the Remove parameter. Even so, the file that's being downloaded is being removed from the server.
I think its some sort of a bug in the API.

I am using latest version of WinSCCP .Net API with SFTP protocol.

Any help would be greatly appreciated.