Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR BASIC

dos assign command output to variable (when output is a single line)

FOR /F "tokens=* USEBACKQ" %%F IN (`command`) DO (
SET var=%%F
)
ECHO %var%
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dos #assign #command #output #variable #output #single
ADD COMMENT
Topic
Name
3+7 =