Yeah Men, I luv u!!!!!!!
i got my data with:
example
-----------------
FOR /F "tokens=6*" %%A IN ('Net time \\{ip any computer}') DO set my_var=%%A %%B
Echo %my_var%
-----------------
today this resolved my problem
but if the execute had a result with many lines you can see only the last line.
if the last line had a less tokens than penultimate you can see the last words or tokens of penultimate lines.
-----------------------------------------------------------------------------------
for other poeple to wants resolve that
FOR /F
Syntax
FOR /F ["options"] %%parameter IN (filenameset) DO command
FOR /F ["options"] %%parameter IN ("Text string to process") DO command
Key
options:
delims=xxx The delimiter character(s) (default = a space)
skip=n A number of lines to skip at the beginning of the file.
(default = 0)
eol=; Character at the start of each line to indicate a comment
The default is a semicolon ;
tokens=n Specifies which numbered items to read from each line
(default = 1)
usebackq Specify `back quotes`:
- Use double quotes to quote long file names in filenameset.
- Use single quotes for 'Text string to process'
(useful if the text string contains double quotes)
Filenameset : A set of one or more files. Wildcards may be used.
If (filenameset) is a period character (.) then FOR will
loop through every file in the folder.
command : The command to carry out, including any
command-line parameters.
%%parameter : A replaceable parameter:
in a batch file use %%G (on the command line %G)
From:
http://ss64.com/nt/for_f.html