Post a reply

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

oztranet

Re: Using port 21 for ftps in a batch-script

Your script works fine. Many Thanks!
martin

Re: Using port 21 for ftps in a batch-script

Use ftpes://:
https://winscp.net/eng/docs/session_url
Or -explicit switch of the open command:
https://winscp.net/eng/docs/scriptcommand_open#explicit

Also note that your batch file syntax is wrong. You cannot insert winscp.exe into winscp.com command-line. Maybe you wanted this:
winscp.com /loglevel=0 /logsize=3*5M /log="uploader.log" /command ^
    "open ftpes://netupdate:myPassword@r27.hallo.cloud/" ^
    "synchronize remote -delete  ""\\WS-01\D$\netupdate\"" ""/logonskript""" ^
    "exit"
oztranet

Using port 21 for ftps in a batch-script

Hello community,
because of a new webhoster, I don't have the possibility to use SFTP anymore. So I've tried to change my upload-script from SFTP to FTPS.

This is my current script:
winscp.com /command ^
    "open ftps://netupdate:myPassword@r27.hallo.cloud/" ^
    "synchronize remote -delete  ""\\WS-01\D$\netupdate\"" ""/logonskript""" ^
 
winscp.exe /loglevel=0 /logsize=3*5M /log="uploader.log"
    "exit"

I think the connection failed, because the script tried to use port 990 (implicit). In my WinSCP GUI I need to use port 21... This is the my current logfile-output:
. 2021-04-17 09:02:25.881 --------------------------------------------------------------------------
. 2021-04-17 09:02:25.881 WinSCP Version 5.11.1 (Build 7725) (OS 10.0.17763 - Windows Server 2019 Standard)
. 2021-04-17 09:02:25.881 Configuration: O:\Entwicklung\Projekte\Netlogon-Skript\SFTP-Updater\Uploader\WinSCP.ini
. 2021-04-17 09:02:25.881 Log level: Normal, Rotating after: 5M, Keeping at most 3 logs
. 2021-04-17 09:02:25.881 Local account: DOM1\root
. 2021-04-17 09:02:25.881 Working directory: O:\Entwicklung\Projekte\Netlogon-Skript\SFTP-Updater\Uploader
. 2021-04-17 09:02:25.881 Process ID: 9324
. 2021-04-17 09:02:25.881 Command-line: "O:\Entwicklung\Projekte\Netlogon-Skript\SFTP-Updater\Uploader\WinSCP.exe" /console=5.11.1 /consoleinstance=_7328_946 "/command" "open ftps://netupdate:***@r27.hallo.cloud/" "synchronize remote -delete  ""\\WS-01\D$\netupdate\"" ""/logonskript""" "
. 2021-04-17 09:02:25.881 winscp.exe" "/loglevel=0" "/logsize=3*5M" "/log=uploader.log"
. 2021-04-17 09:02:25.881 Time zone: Current: GMT+2, Standard: GMT+1 (Mitteleuropäische Zeit), DST: GMT+2 (Mitteleuropäische Sommerzeit), DST Start: 28.03.2021, DST End: 31.10.2021
. 2021-04-17 09:02:25.881 Login time: Samstag, 17. April 2021 09:02:25
. 2021-04-17 09:02:25.881 --------------------------------------------------------------------------
. 2021-04-17 09:02:25.881 Script: Retrospectively logging previous script records:
> 2021-04-17 09:02:25.881 Script: open ftps://netupdate:***@r27.hallo.cloud/
. 2021-04-17 09:02:25.881 --------------------------------------------------------------------------
. 2021-04-17 09:02:25.881 Session name: netupdate@r27.hallo.cloud (Ad-Hoc site)
. 2021-04-17 09:02:25.881 Host name: r27.hallo.cloud (Port: 990)
. 2021-04-17 09:02:25.881 User name: netupdate (Password: Yes, Key file: No, Passphrase: No)
. 2021-04-17 09:02:25.881 Transfer Protocol: FTP
. 2021-04-17 09:02:25.881 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2021-04-17 09:02:25.881 Disable Nagle: No
. 2021-04-17 09:02:25.881 Proxy: None
. 2021-04-17 09:02:25.881 Send buffer: 262144
. 2021-04-17 09:02:25.896 UTF: Auto
. 2021-04-17 09:02:25.896 FTPS: Implicit TLS/SSL [Client certificate: No]
. 2021-04-17 09:02:25.896 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2021-04-17 09:02:25.896 Session reuse: Yes
. 2021-04-17 09:02:25.896 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2021-04-17 09:02:25.896 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2021-04-17 09:02:25.896 Cache directory changes: Yes, Permanent: Yes
. 2021-04-17 09:02:25.896 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2021-04-17 09:02:25.896 Timezone offset: 0h 0m
. 2021-04-17 09:02:25.896 --------------------------------------------------------------------------
. 2021-04-17 09:02:26.043 Connecting to r27.hallo.cloud:990 ...
. 2021-04-17 09:02:41.984 Timeout detected. (control connection)
. 2021-04-17 09:02:41.984 Connection failed.

What I have to change in my script to use explicit encryption?