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
In between Asterisk BLF
Can't access variable in code behind page
Laptop running windows vista, SYSTEM process goes to 100% cpu after being accessed by any computer on the network.
Which AV receiver will cover listed requirements?
Error message when replying, sending, openning email in OWA
broad cast message to win xp and win vista systems via Windows 2003 server
Creating a Dynamic Form from SQL database tables in ColdFusion
Adding one cell to the bottom of a named range defined byan OFFSET
SQL*Loader - Trim Leading & Trailing Space for Columns with Spaces in Name
How do I add rows to a datagridview based upon a For Each statement in VS2008?