Microsoft
Software
Hardware
Network
Question : cmd FOR /f tokens 2* doesn't work
Morning gents,
Have trouble with a cmd string, which should work....
I need to find all text in file C:\zzsticker.txt after "L3= "
In the attached file there is a line: L3= Zebra ZM400
Below cmd lines would show only Zebra, and not token 3 !
For /F "tokens=2-3" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
For /F "tokens=2*" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
For /F "tokens=2,3" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
or
For /F "tokens=2,3" %a in ( 'FIND /i "L3= " ^< C:\zzsticker.txt' ) do set L3=%a
Whats wrong ?
Attachments:
zzsticker.txt
(87 bytes)
(File Type Details)
file with the info to look for
Answer : cmd FOR /f tokens 2* doesn't work
Sorry, typo when copying and pasting.
That should have been
For /F "tokens=1*" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%b
Random Solutions
PL/SQL Export table data to .csv file and save; launch Excel inside PL/SQL and load saved .csv file
SSRS - Relationship setup in Report model
checking login & pass with curl
Variable not defined error using VBA ExportAsFixedFormat Type:=xlTypePDF in excel 2003
Clear Fields in Lotus Notes
FTP not working on Windows Server 2008 IIS 7
How to get unique records based on maximum date?
SAS or SATA
what msstd in outlook anywhere used for?
How to make an exclusive edit