Source file overwritten with blank after transfer

Advertisement

ajorg
Joined:
Posts:
1

Source file overwritten with blank after transfer

I am using the WinSCP .NET assembly to transfer a file via SFTP to an off-site server. My application creates an XML file locally, and then uses the WinSCP .NET assembly to perform the transfer. On some occasions (it has happened 3 of about 10 times), after the file is successfully transferred, the local source file is overwritten, and while it retains the XML schema, it has no records. The destination file remains correct.

The odd thing is that there is no code that manipulates the source file. Once the file has been transferred, the application code stops. Something else is overwriting this file, and I cannot figure out what it is. Any ideas?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Source file overwritten with blank after transfer

WinSCP never overwrites source file (it can delete it, if ask to). If you need more help, please share your code or even better a log file for upload, when the problem happened.

Reply with quote

Advertisement

You can post new topics in this forum