saving export of a command into a variable
Moderator: DosItHelp
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
saving export of a command into a variable
how to save export of a command into a variable?
Re: saving export of a command into a variable
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
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
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
Re: saving export of a command into a variable
yes. that is true
i mean output
thank u so much
and sorry for my english
i mean output
thank u so much
and sorry for my english