Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Is there a dos command to filter text in files??..
example txt
Agente,Nombre
47,David Mendozathis information is in the txt file, what i would like to do is filter the text and end up only with the number, in this case the ending result would be "47", this i would be able to run it as a variable to run an extra process, thanks in advance
note: also, i found and external program that does this, but since i only have the source code, and haven't been able to compile it and u believe u can do it, i'll send u the file on request it's on C++,
Here i go again...

Hi David
If its always in the same format and the number is first and on the last line.@echo off
for /f "tokens=1 delims=," %%a in (Example.txt) do set Num=%%a
echo %Num%

what if
Microsoft Windows 98 (Version 4.10.2222)
i wanted the "98" to be directed to filename1.batand also
Microsoft Windows XP (Version 5.1.2600)
i wanted the "XP" to be directed to filename2.batplease help me

Not quite clear here.
You want 98 [or XP] to go into an existing bat?
Or what?
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |