script malfunction

Advertisement

Kospi
Joined:
Posts:
5

script malfunction

Hi all,
I am writing a simple automation script using c#. I want to upload two files, but previously,
I want that script delete the last file and then rename since last 9 nine files uploaded starting from 09 to 10, 08 to 09, etc.
Script is divided in two part of code, first part function ok, bat second part stop in someplace and I don't understand what is happening, maybe is delate for some reason?

Previos to start I send this commands:
winscp.StandardInput.WriteLine("option batch continue");
winscp.StandardInput.WriteLine("option confirm off");
winscp.StandardInput.WriteLine("option transfer binary");

Also i add log file.
Thank you for any help in advance.
Fernando

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,598
Location:
Prague, Czechia

Re: script malfunction

Do you get the same problem with the latest version of WinSCP?

Anyway, you are trying to rename a file that does not exist. Check if the file exists first.

In C# it is way better to use WinSCP .NET assembly:
https://winscp.net/eng/docs/library

Reply with quote

Advertisement

You can post new topics in this forum