Topic "put command in script file"

Author Message
jbradshaw666
[View user's profile]

Joined: 2017-08-16
Posts: 2
Location: US
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.
Advertisements
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
"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?
jbradshaw666
[View user's profile]

Joined: 2017-08-16
Posts: 2
Location: US
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.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26705
Location: Prague, Czechia
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.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License