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
Getting IIS7 to Show Friendly Error Messages in ASP
jquery
paypal integration in asp.net /VB
Block access to a single website - Software Resttriction Policies
DNS Event ID's 4010 & 4013
gmail reciepient notification
Create Table (MS SQL 2008) with Time Column that accepts 14:00 format only
asp.net size
Two SCCM primary site in active directory
How to create Point using ArcGIS?