create a vbs file

J

Jim

Hello,
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, of is there any news group that I can ask this?
Thanks
Jim.
 
P

Pegasus \(MVP\)

You don't need a vbs file for such a simple task. The
following batch file will do it quite nicely:

@echo off
type c:\Jim.txt | more +5 > c:\new.txt
 
J

Jim

Thanks Pegasus,
I need to skip a few lines at the button too, how can I do
that?
Thanks,
Jim
 
P

Pegasus \(MVP\)

What you're doing here is called "scope creep" . . .
AFAIK your new requirement is well outside the scope
of a batch file, as it requires counting & storing lines,
perhaps even going backwards in your text file. On
the other hand, if the lines to be skipped are
characterised by a common string then you can
use the find command to suppress them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top