Topic "port number in open command"

Author Message
nimmis
[View user's profile]

Joined: 2014-09-16
Posts: 8
Location: CA
Writing my first script and need help. when I run this Connection fails. Looking at site Manager for this site on the GUI front-end I see port number is set to 31110. When the script runs, port number =21 in the log file.
Can someone help me? How do I change the port number in the open command? I tried -port=31110 and the script will not even run.
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open ftp://userid:password@ftp.xyz.com/ -certificate="34:b4:0a:6f:4f:be:6f:0c:43:e9:52:e8:e8:3c:92:56:ce:03:7b:5b"
# Disconnect
close
# Exit WinSCP
exit
nimmis
[View user's profile]

Joined: 2014-09-16
Posts: 8
Location: CA
I figured it out
open ftp://<<username>>:<<password>>@xyz.celink.com:31110/ -explicittls -certificate="bb4:b4:0a:6f:4f:be:6f:0c:43:e9:52:e8:e8:3c:92:56:ce:03:7b:5b"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
Yes, that's correct. See http://winscp.net/eng/docs/session_url
I have now also explicitly mentioned this in a documentation to the open command:
http://winscp.net/eng/docs/scriptcommand_open#remarks
_________________
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