Sorry found two typo's
zf
Main Topics
Browse All TopicsHi The problem is that i need to write the content of the file: ConfigNetwork.txt also the output on the screen.
What do i need to write exactly and what will be the output on the screen
Question1
1 Option explicit
2 Dim objFile MyFile Line1, Line 2
3 Const ForRead = 1, ForWrite = 2, ForAppend = 8
4
5 'having this file: "c:\ConfdigNetwork.txt" )an empty file)
6
7 Set objFile=CreateObject("Scri
8 Set MyFile=objFile.OpenTextFil
9 MyFile.WriteLine "Mes Donnees"& vbCRLF
10 WScript.echo Line1
11 WScript.echo Line2
12 Set MyFile=objFile.OpenTextFil
13
14 DO WHILE NOT MyFile.AtEndOfStream
15 Line1 = MyFile.ReadLine
16 Line2 = MyFile.ReadLine
17 WScript.echo Line1
18 WScript.echo Line2
19 LOOP
20
21 Set MyFile=objFile.OpenTextFil
22 MyFile.WriteLine "This is & - & Line 1"
23 MyFile.WriteLine "This is & - & Line 2"
24 Set MyFile=objFile.OpenTextFil
25 DO WHILE NOT MyFile.AtEndOfStream
27 Line1 = MyFile.ReadLine
28 Line2 = MyFile.ReadLine
29 WScript.echo Line1
30 WScript.echo Line2
31 LOOP
32
33 WScript.echo
34 WScript.echo "End"
35 MyFile.Close
36 WScipt.quit 0
The problem is that i need to write the content of the file: ConfigNetwork.txt also the output on the screen.
What do i need to write exactly and what will be the output on the screen
Thank you
i will give 80 points for whoever gives me the solution
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: zoofanPosted on 2009-05-06 at 13:37:04ID: 24319381
Not sure if this is what you mean...but
this will open your file write two lines and then close the file
open the file, read all lines and echo them to the screen and then close the file.
more direct information would help provide a more direct answer.
zf
Select allOpen in new window