Computing.Net > Forums > Windows XP > Echo WOrds from TXT File To Batch

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.

Echo WOrds from TXT File To Batch

Reply to Message Icon

Name: guitargraham
Date: February 20, 2008 at 13:35:50 Pacific
OS: Vista
CPU/Ram: ?
Product: HP Pavillion dv9000
Comment:

How do I echo the words in a txt file to my batch file. For example: If my text file says: Hi. This is a text file.
How would I make that appear in the batch file?
I already tried echo 'sample.txt'
It didn't work!! PLEASE HELP!!!!!!!!!!!!

From Guitargraham



Sponsored Link
Ads by Google

Response Number 1
Name: mavis007
Date: February 20, 2008 at 14:41:23 Pacific
Reply:

... you could try:

type c:\path\filename.txt

Grrrr
wat do I know?
... got brain freeze


0

Response Number 2
Name: tonysathre
Date: February 20, 2008 at 15:23:12 Pacific
Reply:

for /f "tokens=*" %%w in ('type sample.txt') do (
echo %%w >> yourscript.bat
)



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 Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Echo WOrds from TXT File To Batch

Replace a char from txt file by batch file www.computing.net/answers/windows-xp/replace-a-char-from-txt-file-by-batch-file/179003.html

Batch file to remove strings www.computing.net/answers/windows-xp/batch-file-to-remove-strings/172868.html

Delete lines form file using batch www.computing.net/answers/windows-xp/delete-lines-form-file-using-batch/177936.html