Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

byte711

I have a stack of commands in a .bat file to upload a file from my Windows computer to a Unix server via winscp command, ie:
"c:\Program Files\WinSCP\winscp.com" /command "open ""USERID:PASSWORD@HOSTNAME001/var/tmp""" "put ""c:\temp\FILE.tar.gz" "exit"
"c:\Program Files\WinSCP\winscp.com" /command "open ""USERID:PASSWORD@HOSTNAME002/var/tmp""" "put ""c:\temp\FILE.tar.gz" "exit"
"c:\Program Files\WinSCP\winscp.com" /command "open ""USERID:PASSWORD@HOSTNAME003/var/tmp""" "put ""c:\temp\FILE.tar.gz" "exit"
(... and so on ...)


I'm prompt for each HOSTNAMExx to enter either:
'(Y)es, (N)o, C(a)ncel, (C)opy'

I have to manually enter 'Y' (without the single quotes) for each winscp.com that is executed in the DOS .bat file. How can I automate the 'Y' for each winscp.com in the .bat file?

I sometimes have hundreds of servers I need to upload a file (ie: a Unix install tar file) to. Thanks!
byte711

Automate a 'Y' when Prompt by: (Y)es, (N)o, C(a)ncel, (C)opy

I sometimes have to upload a file from my Windows computer to a bunch of our Unix servers. I use the the following syntax to do this: "c:\Program Files\WinSCP\winscp.com" /command "open ""USERID:PASSWORD@HOSTNAME/var/tmp""" "put ""c:\temp\FILE.tar.gz" "exit"

I'm prompt for each winscp command with, '(Y)es, (N)o, C(a)ncel, (C)opy' in DOS on my Windows computer. Is there a way in the winscp.com command line I can have it default to -> Y ?

Thanks