Small Program Create Need Help

January 5, 2012 at 08:35:13
Specs: Windows XP
hi
i need craete smal program i load text file
example
text file
_____________________
1 35629852
2 36562665
3 52982156
4 52368955
5 26565595
6 62549565
7 51155265
_____________________
i want snow 5 line date (5 26565595)

just load text file and snow 5 line date only in program windows
plz help


See More: Small Program Create Need Help

Report •


#1
January 5, 2012 at 08:59:09
A batch statement can do the job

for /F "skip=4 delims=" %%i in (File.txt) do (@echo.%%i & goto :EOF)

Instead of running a batch script you can just type the above command at prompt replacing %%i with %i.

Report •

#2
January 5, 2012 at 09:00:24
This shows you the text file. When you say, 5 lines of data, do you mean 1 to 5?

@echo off
SETLOCAL DisableDelayedExpansion
FOR /F "usebackq delims=" %%a in (`"findstr /n ^^ Test.txt"`) do (
    set "var=%%a"
    SETLOCAL EnableDelayedExpansion
    set "var=!var:*:=!"
    echo(!var!
    ENDLOCAL
)

pause


Report •

#3
January 5, 2012 at 09:27:59

no need 1 to 8
only 5 line need

Report •

Related Solutions


Ask Question