Files being delete when we have an error on GetFiles ?

Advertisement

Mike.Keers
Joined:
Posts:
2
Location:
Florida

Files being delete when we have an error on GetFiles ?

Hi

I am using the .Net Interface to Pull files down from a server.

It basically work fine except when I get errors it seems to delete the File I am trying to Download and the other files in the directory ?

The Next Call does not contain the file that caused the error or the other files in the directory during the earlier call ?

I have attached the logs of the error and the code that I call it with.

This is my log of the error.

1441938058 2020-06-24 23:12:51.360 1 DownloadFileViaFTP Starting
1441938064 2020-06-24 23:12:51.863 1 DownloadFileViaFTP Got Directory 3 Files
1441938067 2020-06-24 23:12:52.097 1 DownloadFileViaFTP Error : Cant get attributes of file \iteminfo\MPS2\/W2.1.4024062020231234101000.xml. Host 172.16.5.73 User gbiftpuser Password gbiftpuser
1441938068 2020-06-24 23:12:52.100 1 DownloadFileViaFTP Ending
Next Session
1441938352 2020-06-24 23:13:22.110 1 DownloadFileViaFTP Starting
1441938361 2020-06-24 23:13:22.610 1 DownloadFileViaFTP Got Directory 4 Files
1441938362 2020-06-24 23:13:22.743 1 DownloadFileViaFTP Download of /\iteminfo\MPS2\/W2.1.4024062020231254101000.xml succeeded
1441938369 2020-06-24 23:13:22.880 1 DownloadFileViaFTP Download of /\iteminfo\MPS2\/W2.1.4024062020231304101000.xml succeeded
1441938370 2020-06-24 23:13:23.010 1 DownloadFileViaFTP Download of /\iteminfo\MPS2\/W2.1.4024062020231314101000.xml succeeded
1441938373 2020-06-24 23:13:23.117 1 DownloadFileViaFTP Ending
  • Code_C#.txt (6.72 KB, Private file)
Description: This is the C# code that I call the down load the files
Description: This is the session log for the error.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,710
Location:
Prague, Czechia

Re: Files being delete when we have an error on GetFiles ?

There's no "delete" issued by WinSCP in the log. If the file disappeared from the server, it must have been deleted for other reason, and not by WinSCP. Maybe the file was actually deleted between LIST and SIZE already and that's why the download fails in the first place.

Reply with quote

Mike.Keers
Joined:
Posts:
2
Location:
Florida

Solved:

Hello,
Thank You for your help. we found the problem and it was not anything to do with WinSCP or .NET Assembly. After finally getting the server logs we found that the customer had started an extra copy of our transfer program on another machine and both programs were completing for the same files in the directory. That is why the files seemed to disappear and why where getting error in trying to access the files.

Once again thanks for your help.

Mike Keers

Reply with quote

Advertisement

You can post new topics in this forum