put command in script file

Advertisement

jbradshaw666
Joined:
Posts:
2
Location:
US

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\WinSCP.com" /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\WinSCP.com" /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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

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?

Reply with quote

jbradshaw666
Joined:
Posts:
2
Location:
US

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

Thanks.

Jeff.

Reply with quote

martin
Site Admin
martin avatar

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.

Reply with quote

Advertisement

You can post new topics in this forum