Variable Use

User discussion and information resource forum for scripting of TeraByte products using script lanugages such as TBScript, VBScript, Batch Files, and more.

Variable Use

Postby robertd » Tue Oct 16, 2018 10:02 pm

Is there a way using TBscript to substitute a variable into a parameter string ?

For example :

In the the line

exec("c:\efi\bootit\imageu.efi /b /uy /d:1 /f:0@0x2:^"\TeraByte Image\XXXXXX\System Backup^" /v",1)

I would like XXXXXX to be the value of a variable set earlier in the script.

Appreciate any suggestions

Robert
robertd
 
Posts: 22
Joined: Sun Dec 01, 2013 11:01 pm
Location: Victoria, Australia

Re: Variable Use

Postby Eric » Tue Oct 16, 2018 10:26 pm

If "a" is the variable, you replace your XXXXXX with the following:
" # a # "
Eric
 
Posts: 141
Joined: Mon Sep 05, 2011 11:53 am
Location: France

Re: Variable Use

Postby robertd » Wed Oct 17, 2018 3:29 am

Hi Eric

Worked like a dream ! - will save a few lines of code !
Thanks for the quick reply - appreciate it

Robert
robertd
 
Posts: 22
Joined: Sun Dec 01, 2013 11:01 pm
Location: Victoria, Australia


Return to Scripting

cron