2

Possible Duplicate:
Batch equivalent of Bash backticks

In unix we use `` for command output substitution.

e.g.

export a=`pwd`

Is there any equivalent for this (``) in DOS command prompt?

Community
  • 1
  • 1
M K Saravanan
  • 359
  • 1
  • 4
  • 12

1 Answers1

12

Unix:

export var1=`pwd`

DOS:

FOR /F %a IN ('pwd') DO SET var1=%a
deepsnore
  • 976
  • 5
  • 13