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

martin

Re: Use %hostname% of the remote host in a script

So how do you provide the hostname to the connection settings? (the open command)
Provide the hostname to the get command the same way.
If you want more specific help, please post your complete script.
ALES

Use %hostname% of the remote host in a script

Hello,

I'm currently working on a script to save the startup configuration on my switch to our local server.

I would like to save my log with this format after the copy:
get startup.cfg "SaveConf_"name of the switch"_%TIMESTAMP#yyyy-mm-dd%"

where "name of the switch" is a variable pickup automatically like %hostname% for example.
%hostname% doesn't work here so is there any preconfigured variable that does this job?
If no, is there a way to create one?

Thanks for your help,
Best regards.