Hello,
I do not know anything about VBScript yet. How can I
write a vbs file in windows 2000 that handles the
following?
1. Open a text file
2. jump a few lines
3. read the rest of lines and write to another file
4. exit
Any Help?
Thanks
Jim.

Re: write to a file by Al

Al
Sun Aug 24 20:21:26 CDT 2003

If someone gave you a script to do exactly what you want, would you know any
more about vbscript as a result?

That said, see comments in-line

"Jim" <xyz_999@hotmail.com> wrote in message
news:024d01c36aa4$386c0550$a601280a@phx.gbl...
> Hello,
> I do not know anything about VBScript yet. How can I
> write a vbs file in windows 2000 that handles the
> following?
> 1. Open a text file

read about the File System Object in the vbscript/WSH documentation,
specifically the .OpenTextFile method.

> 2. jump a few lines

No such thing - I would just read a few lines (with the .ReadLine method of
a textstream object, and then not do anything with the input.

> 3. read the rest of lines and write to another file

.ReadLine and .WriteLine. You will need to use .CreateTextFile or .Open to
create the output stream.

> 4. exit

Just fall off the end of the script, or use Wscript.quit

> Any Help?

I dunno, you be the judge.

/Al



Re: write to a file by Alex

Alex
Mon Aug 25 10:33:36 CDT 2003

Joe Fawcett wrote:

> SkipLine method?

no one ever uses that - you win a trivia award... but yes. ;) (waiting for
30 people who use it every day to post back now.)

I do wish there was a "SkipBlankLines" property one could set for a stream.
Gets annoying to have to test it myself.




Re: write to a file by Jim

Jim
Mon Aug 25 13:34:37 CDT 2003


Hello,
Thanks for the input. I know I should spend time and learn
all this things but it would be very helpful for me if I
got a working vbs file so I go and work on that to expend.
As I mentioned I have never wrote a script before.
Thanks,
Jim.

>-----Original Message-----
>Joe Fawcett wrote:
>
>> SkipLine method?
>
>no one ever uses that - you win a trivia award... but
yes. ;) (waiting for
>30 people who use it every day to post back now.)
>
>I do wish there was a "SkipBlankLines" property one could
set for a stream.
>Gets annoying to have to test it myself.
>
>
>
>.
>