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

stevewa

script, is there a way to include a file which contains variables in an ini format?

i read the option page
https://winscp.net/eng/docs/scriptcommand_option
but i do not see any choice to include a file
i.e. option include myconfig.ini


I will have many scripts, and to avoid typing the same information in each script, I wish to have those variables in 1 file, ie myconfig.ini
server_host=""
hostkey="ssh-rsa blah blah blah"

and be able to include that file in my script with a command like
option include
or
option import

and have those variables be parsed and loaded in memory and availble to the script
(like env variables but not actual env vars)

is there any feature in winscp which can do this?

thank you.