Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please Help batch file find a specific word and show word on next line

Status
Not open for further replies.

zoodaddy

Technical User
May 13, 2010
10
US
I need to find a word (which would be %username%)
in a text file and then display the next line
(which would be the users name)

Text file ex.

N123456 44
Nameof User0
N123457 44
Nameof User1
N123458 39 <---- Find N123458 which is %Username%
Nameof User2 <---- then echo the next line full name of User
N123459 38
Nameof User3
N123450 39
Nameof User4

Search file for N123458 and then echo Nameof User2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top