scripting automationI need to create a passive batch ftp pro

Advertisement

tomp
Joined:
Posts:
3
Location:
Minnesota

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum