Don't worry so much about the middle command. My problem is the server I connect to every one in a while will timeout. So the command will retry but it's getting the retry from the middle of the second command. So looking at my output - is says:

'ogram' is not recognized as an internal or external command, operable program or batch file.

How do I on a command line make WinSCP automatically send an R (or just automatically retry) ? I see there's the option command but I don't see how I would do that as part of the command line.

Re: put command in script file

It appears as if the upload is timing out so it puts an (A)bort or (R)etry up (I can see it in my log file) and appears to read the input file (.bat file) and the next line is "c:\program file..." so it finds the R and continues.
But the next line becomes "ogram file..." so it's a problem.
So I'm trying to have it automatically retry without any user input. If you look at the lines, you will see that we are running WinSCP, running a command program, running WinSCP, running a command program,...