Computing.Net > Forums > Programming > Batch file to edit/format 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.

Batch file to edit/format text

Reply to Message Icon

Name: frukqs
Date: April 19, 2007 at 22:15:10 Pacific
OS: dos
CPU/Ram: yes
Product: aha
Comment:

Hi, im in great need of a batch script that goes through a text file and removes the first word in every row and the empty space between first and second word.

the text file is a list that looks like following:

random data
random data
random data

Thanks in advance!




Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: April 20, 2007 at 02:56:17 Pacific
Reply:

The script below works under Win NT/2K/XP, if you really run under Win 9X/ME or plain DOS, a third party tool is needed. Specify always your exact environment as DOS is too generic.

@Echo Off
For /F "tokens=1,*" %%A in (MyFile_In.txt) Do (
Echo %%B>> MyFile_Out.txt)

Replace MyFile_In.txt and MyFyle_Out.txt with the names you like for your text files In/Out with the only limit blanks are not allowed.


0
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: Batch file to edit/format text

Batch file to change some text. www.computing.net/answers/programming/batch-file-to-change-some-text/18769.html

Batch file to edit files www.computing.net/answers/programming/batch-file-to-edit-files/16906.html

DOS batch file to read newest text file www.computing.net/answers/programming/dos-batch-file-to-read-newest-text-file/19729.html