Topic "scripting automationI need to create a passive batch ftp pro"

Author Message
tomp
[View user's profile]

Joined: 2010-03-13
Posts: 3
Location: Minnesota
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

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