Page 1 of 1

saving export of a command into a variable

Posted: 24 Mar 2012 15:37
by Mohammad_Dos
how to save export of a command into a variable?

Re: saving export of a command into a variable

Posted: 24 Mar 2012 16:20
by aGerman
That's a bit unspecific. If "export" means "output" of a command then you could use a FOR /F loop to save a line or a part of a line into a variable. Generally:
for /f "your options here" %%i in ('your command line here') do set "variable=%%i"

That's also unspecific but it's the best I can answer. It depends on the command, its output and what part of it you want to save ...

Regards
aGerman

Re: saving export of a command into a variable

Posted: 24 Mar 2012 16:49
by Mohammad_Dos
yes. that is true
i mean output
thank u so much

and sorry for my english :oops: