Re: Script, is there a way to include a file which contains variables in an ini format?
You can save your session to a read-only INI file and use with with
https://winscp.net/eng/docs/commandline#configuration
And then use it like
myconfig.ini being:
Or you can actually use the env variables in batch file like this:
with myconfig.bat being like:
/ini=myconfig.ini
commandline switch:
https://winscp.net/eng/docs/commandline#configuration
And then use it like
open sessionname
myconfig.ini being:
[Sessions\sessionname]
HostName=example.com
UserName=username
PasswordPlain=password
Or you can actually use the env variables in batch file like this:
call myconfig.bat
winscp.com /ini=nul /command "open %SESSION%" ... "exit"
with myconfig.bat being like:
set SESSION=sftp://username:password@example.com/