0

Is it possible to declare a variable and use it in the same line? For example (this doesn't work):

set foo="bar" && echo %foo%

to print bar.

1 Answers1

2
set "foo=bar" && call echo %^foo%
Paulo Campez
  • 702
  • 1
  • 8
  • 24