Computing.Net > Forums > Programming > Delete First Line of Text

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Delete First Line of Text

Reply to Message Icon

Name: CWoodward
Date: February 7, 2006 at 15:38:15 Pacific
OS: Windows XP
CPU/Ram: Intel Celleron
Comment:

Hello! I would like to use a batch file to delete the first line of a text file and send the rest of the file to a new text file.

Thanks,
Cale



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: February 7, 2006 at 22:43:37 Pacific
Reply:

::== noFIRST.bat
@echo off > outFILE
if %1'==' echo which file? && goto :eof

set FIRST=Y
for /f "tokens=*" %%L in (%1) do call :1 %%L
goto :eof

:1
if %FIRST%==N echo %*>>outFILE
set FIRST=N
goto :eof

:eof
:: DONE



If at first you don't succeed, you're about average.

M2Go


0

Response Number 2
Name: CWoodward
Date: February 8, 2006 at 16:15:58 Pacific
Reply:

Thanks a lot, that works great. Sorry, I didn't realize there was another post on this same subject until after I posted this one.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Delete First Line of Text

Delete first line of text www.computing.net/answers/programming/delete-first-line-of-text/13312.html

.bat delete first line of text file www.computing.net/answers/programming/bat-delete-first-line-of-text-file/13773.html

Extract First Line of Text www.computing.net/answers/programming/extract-first-line-of-text/13939.html