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: scripting automationI need to create a passive batch ftp pro

I do not see anything wrong about your script. Except that if you run winscp.exe without /console switch, it runs silently in a background, so you won't see anything.
tomp

scripting automationI need to create a passive batch ftp pro

I need to create a passive batch ftp procedure. I'm using WinSCP version 4.2.7 build 758. I just downloaded WinSCP and am using it for the first time.

For this use, the site to be connected to can vary, but the commands used once the connection is made are the same no matter what site is connected to. There should be no user interaction.

I thought I would put the ftp connection in the command line and the standard commands into a script. but I understand this isn't allowed:

"For security reasons, when protocol (sftp://, ftp:// or scp://) is provided on command line (possible execution from web browser/Windows Explorer), all command-like parameters that cause any automatic action are ignored, including /defaults, /log, /script and /command."

It does connect to the site, but warns that automatic actions are ignored - and they are.

I guess I have to put the 'open' into the script file, but I haven't figured out what the command line needs to be to get a script containing the 'open' and other commands to execute. Because the site varies, I don't see that a 'stored session' is the answer. The following command line seems to do nothing:

"c:\Program Files\WinSCP\WinSCP.exe" /script="c:\Reservation Master 4\testWinSCP.cmd"

where the contents of testWinSCP.cmd are

open ftp://<user>:<pwd>@ftp.northern-acres.com -passive

What am I doing wrong?? Or am I unable to do a 'passive batch ftp' with WinSCP?