[Batch File] How to get number in text file.?

December 10, 2012 at 08:09:21
Specs: Windows XP

Hi all.
I have a text file with contents:
[1]. fdsfdsfds
[2]. dghgfhfgd
...
[24]. dafdasfdsfs
[25]. yutyjfjhfhr
...
[100]. jgkgk
[101]. ioyouyiku
...
[3210]. tuityjhrhes
I want get the number on lines
1
2
3
...
24
25
...
100
101
...
3210
Thank all.

See More: [Batch File] How to get number in text file.?

Report •


#1
December 10, 2012 at 08:43:30

@for /f "tokens=1@ delims=[]" %%a in (file.txt) do echo %%a

Report •

#2
December 10, 2012 at 21:57:51

nbrane,

what's this:

tokens=1@

=====================
M2 Golden-Triangle


Report •

#3
December 11, 2012 at 22:15:18

Haha! my fingers did the walking, and they had too many beers...
(always blame it on someone else...)

Report •

Related Solutions

#4
December 12, 2012 at 20:01:55

Was wondering the same thing. :)

Tony


Report •


Ask Question