PC Review


Reply
Thread Tools Rate Thread

create a vbs file

 
 
Jim
Guest
Posts: n/a
 
      25th Aug 2003
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.

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      25th Aug 2003
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


"Jim" <(E-Mail Removed)> wrote in message
news:035f01c36aa2$fe84fb40$(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      25th Aug 2003
Thanks Pegasus,
I need to skip a few lines at the button too, how can I do
that?
Thanks,
Jim


>-----Original Message-----
>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
>
>
>"Jim" <(E-Mail Removed)> wrote in message
>news:035f01c36aa2$fe84fb40$(E-Mail Removed)...
>> 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.
>>

>
>
>.
>

 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      25th Aug 2003
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.


"Jim" <(E-Mail Removed)> wrote in message
news:09b201c36b09$30e94ee0$(E-Mail Removed)...
> Thanks Pegasus,
> I need to skip a few lines at the button too, how can I do
> that?
> Thanks,
> Jim
>
>
> >-----Original Message-----
> >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
> >
> >
> >"Jim" <(E-Mail Removed)> wrote in message
> >news:035f01c36aa2$fe84fb40$(E-Mail Removed)...
> >> 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.
> >>

> >
> >
> >.
> >



 
Reply With Quote
 
Marc Eastburn
Guest
Posts: n/a
 
      25th Aug 2003
Try the microsoft.public.server.scripting newsgroup, Also
check out
http://www.microsoft.com/technet/treeview/default.asp
url=/technet/scriptcenter/Default.asp




>-----Original Message-----
>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.
>
>
>"Jim" <(E-Mail Removed)> wrote in message
>news:09b201c36b09$30e94ee0$(E-Mail Removed)...
>> Thanks Pegasus,
>> I need to skip a few lines at the button too, how can I

do
>> that?
>> Thanks,
>> Jim
>>
>>
>> >-----Original Message-----
>> >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
>> >
>> >
>> >"Jim" <(E-Mail Removed)> wrote in message
>> >news:035f01c36aa2$fe84fb40$(E-Mail Removed)...
>> >> 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.
>> >>
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a .bat file to create a shortcut on the desktop? Jenny Microsoft Excel Programming 0 19th Sep 2008 03:39 PM
Can not create a new file with File.Create -- throws exception:Access Denied thephatp Microsoft C# .NET 4 30th Mar 2008 04:48 PM
Solution to: Can't create file:.xls. Right click folder you want to create the file in and then click properties on the shortcut menu to check your permissions on this folder Ky_fanatic Microsoft Outlook Discussion 1 8th Dec 2006 07:15 PM
Drag and drop to create a link to a file in a cell of an Excel file paulaugust2003@yahoo.com Microsoft Excel Discussion 2 18th Sep 2005 04:44 PM
Which of your products can be used to create / burn a web to a cd or dvd and also create an autostart file / cd? Windows XP New Users 5 18th Jul 2005 07:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:22 AM.