Hi,
I'm quite new to VBScript and have been creating scripts to clean up some lists of URLs that I have. One type of list I have is generated from emails and is a list of very similar URLs. There is no fixed number of URLs that may be in the list but I always need to remove the first and last URLs as they are useless and waste time.
So I may have a list like this:
The first and last URLs are never the same, so I can't just filter them out by the URL itself. The only constant for these is that it is always the first and last entries in the list that I want to remove.
My question therefore is this:
Is it possible to create a VBScript that can remove the top and bottom lines in a text file, no matter the number of lines in the text file? If so, how?
I have looked at the objTextFile.SkipLine command, however all the examples I have seen have assumed that the text file is of a fixed number of lines (which mine aren't). So I can't just type out skip, read, read, skip, etc...
There must be a way to read all the text lines into an array and then say skip line 1, read all the others and then skip the last line (whatever number that line will be).
Like I say, I'm new to this - so apologies if this is a silly question!
Would really appreciate some help with this one.
Regards
- Gord
I'm quite new to VBScript and have been creating scripts to clean up some lists of URLs that I have. One type of list I have is generated from emails and is a list of very similar URLs. There is no fixed number of URLs that may be in the list but I always need to remove the first and last URLs as they are useless and waste time.
So I may have a list like this:
The first and last URLs are never the same, so I can't just filter them out by the URL itself. The only constant for these is that it is always the first and last entries in the list that I want to remove.
My question therefore is this:
Is it possible to create a VBScript that can remove the top and bottom lines in a text file, no matter the number of lines in the text file? If so, how?
I have looked at the objTextFile.SkipLine command, however all the examples I have seen have assumed that the text file is of a fixed number of lines (which mine aren't). So I can't just type out skip, read, read, skip, etc...
There must be a way to read all the text lines into an array and then say skip line 1, read all the others and then skip the last line (whatever number that line will be).
Like I say, I'm new to this - so apologies if this is a silly question!
Would really appreciate some help with this one.
Regards
- Gord