Computing.Net > Forums > Programming > Read all lines from a txt file

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.

Read all lines from a txt file

Reply to Message Icon

Name: Windoves
Date: June 13, 2009 at 09:07:25 Pacific
OS: Windows 7
Subcategory: Batch
Comment:

Hello guys.
I am having trouble with my script.
I need to get all lines lines to show from a text file.
What I have is a chat script, that you can chat to people that use the same server as you (mainly for schools and offices with shared server)

So there is a write script and a receive script and I need all the lines to show up in the receive script.
This will automaticly create a log too.
------------------------
WRITE SCRIPT
@ echo off
set /p n=Your Name:
:1
echo Max's Chat 0.1
set /p c=Message:
echo %n% says: %C% > temp.txt
cls
goto 1

------------------
RECEIVE SCRIPT
@ echo off
:1
set /p var= <temp.txt
echo %var%
ping localhost -n 3 >nul
cls
goto 1
-------------------------

As I said, I need all the lines or multiple lines to show up in the receive script.

Thanks in advice


EDIT:
Also, if someone comes up with a way that the write and receive script can be combined, so only one window is needed, I would be thankful too!



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: Read all lines from a txt file

delete x number of lines from a CSV file www.computing.net/answers/programming/delete-x-number-of-lines-from-a-csv-file/19820.html

Delete blank lines from a text file www.computing.net/answers/programming/delete-blank-lines-from-a-text-file/14525.html

Extract Values from a txt file www.computing.net/answers/programming/extract-values-from-a-txt-file/17728.html