Re: I've found one way to fix it
Seems not to work if the password contains a forward-slash. Example: ftp://myuser:abcdefg/123@mydomain.com/
You have to URL-encode it:
https://winscp.net/eng/docs/session_url
Seems not to work if the password contains a forward-slash. Example: ftp://myuser:abcdefg/123@mydomain.com/
Should be:
open ftp://username:password@hostname
I created session throughout graphical interface. And using it in script. It works fine! :roll: :wink:
Where would I find session files? I want to use it directly with /ini=mysession.ini
It shows: "Searching for host... Network error: Connection timed out."
If i change "open ftp://aaaa.bbbb.lt" then it works, but prompts for username and password.
Also, if i try "open aaaa.bbbb.lt" shows "Searching for host... Network error: Connection timed out." (the same error as above)
[Sessions\mysession]
HostName=aaaa.bbbbb.lt also tried ftp://aaaa.bbbbb.lt
UserName=myuser
PassWord=mypassword
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# PROBLEM IS BELOW
open username:password@aaaa.bbbbb.lt
# Change remote directory
cd dainava
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
put Groups.txt
# Disconnect
close