Post a reply

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)


Topic review


Re: put command in script file

WinSCP does not read any .bat files. This all makes little sense.
We cannot help you, unless you show us your scripts and log file.

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,...



Re: put command in script file

"will timeout" - At what moment does it "timeout"? Can you post a log file?

"So the command will retry" - How does it retry?

"'ogram' is not recognized" - Does that refer to "SomeProgram" on the second line?

put command in script file

I have a batch file on windows that does a whole lot of commands. Here's a sample of what I'm doing....

"C:\WinSCP\" /ini=nul /command "open -implicit ftp://XXX:YYY@ZZZ" "lcd C:\Fred" "cd Download" "put ImAfile.csv" "exit"
C:\\Utils\\SomeProgram -t "Fred" -s "Today"
"C:\WinSCP\" /ini=nul /command "open -implicit ftp://XXX:YYY@ZZZ" "lcd C:\Fred" "cd Download" "put ImANewFile.csv" "exit"

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.

TIA - Jeff.