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

martin

Re: Cannot get scripts to run

none wrote:

I try running the script from command line like this:
WinSCP3 /console /script=script.txt

But it brings up the GUI and does not do the file transfer.

The command is correct. I have just tried it with the same script.txt file and the same parameters. New console window is opened and WinSCP tries to connect (what naturally fails).

What version of WinSCP are you using?

you need to run winscp3.com, not the .exe.

This is not true. You do not need .com as long as you do not need to run WinSCP from other console application and as long as you use /console parameter (with .com it is used automatically). Read more in documentation.
edernest

Re: Re[2]: Cannot get scripts to run

Then, you need to get yourself a new download.
https://winscp.net/
none

Re[2]: Cannot get scripts to run

Thanks - where do I get winscp.com? - it did not come with the sourceforge install (for Windows) I am using...
edernest

Re: Cannot get scripts to run

You need to run winscp3.com, not the .exe. If you are using a Scheduled Task, you should specify the .com like this:
"C:\Program Files\WinSCP3\winscp3.com" /console /script=script.txt

Make sure you put the arguments _outside_ of the quoted path to the program. This advice applies to Windows built in Scheduled Tasks, but if you are seeing the GUI open up, you are most likely executing the .exe.
none

Cannot get scripts to run

I have a Windows server I that want to automatically get a file from a Linux SSH server every night.

I have installed WinSCP3 on my Windows server and have it working fine with public Key & Pageant to my unix ssh server using the GUI interface.

Next I put this in a script named script.txt:
option batch on
option confirm off
open mrtest@10.1.1.10
option transfer ascii
get /home/mrtest/xfer/junk c:\trans\junk
close
exit

I try running the script from command line like this:
WinSCP3 /console /script=script.txt

But it brings up the GUI and does not do the file transfer.

How do I make this work each night in automated fashion?