session.GetFiles removing file from server automatically

Advertisement

hameer
Joined:
Posts:
2
Location:
Melbourne, Australia

session.GetFiles removing file from server automatically

Hi All,
I am using session.GetFiles method (https://winscp.net/eng/docs/library_session_getfiles) 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.

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

Any help would be greatly appreciated.

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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.

Reply with quote

hameer2
Guest

Code and Log

Hi Martin,

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

Awaiting your response.

Thanks.
  • WinSCP.log (115.73 KB, Private file)
Description: Debug Log File
  • Code.txt (4.56 KB, Private file)
Description: Code. Please check the session.GetFiles method

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

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?

Reply with quote

hameer
Joined:
Posts:
2
Location:
Melbourne, Australia

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.

Reply with quote

Advertisement

You can post new topics in this forum