From reading and programming, I am accustomed to the use of an
environment variable to provide all or part of an argument or option to
an executable; and, though I recall no instances, I expect that one
variable can provide multiple arguments ( Fx: test : OK).
But I recall seeing no instance of using an environment variable to
provide the command itself, with/without arguments/options
included/following/both. That might be powerful, unnecessary, or both.
Tests, in WinXP sp3 Command Prompt, indicate that it does work, at least
in simple cases such as
>set xx=dir /od
>%xx% Q*.*
&
>set xx=di
>%xx%R Q*.*
Questions : Is this type of usage specified by reasonable authority as
legitimate? Is it actually reliable in WinXP, Win 7, Win 10? Is it
useful? Are there traps?
--
(c) John Stockton, Surrey, UK. 拯
merlyn.demon.co.uk Turnpike v6.05 MIME.
Merlyn Web Site < > - FAQish topics, acronyms, & links.