Post a reply

Options
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)

Options

Topic review

martin

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
Kospi

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