Accidental Hyper-V Administrator
asked on
Need VBScript to read a line that contains a program name and then look for it in a folder
Hello everyone.
Can I ask for some help ?
(I'd really REALLY be grateful for it.)
I have a file, C:\RayFile.txt".
This file contains a bunch of lines.
Interspersed within all the lines are a number of lines that contain the names of objects.
Here's an example of what one of those lines look like:
<file name="BLAnnWb4.ocx">
Now, there is a folder, named "C:\RaysFolder", that is supposed to contain the actual object referenced by each <file name="????????.???"> line, inside of C:\RaysFiles.txt.
But sometimes, C:\RaysFolder is missing a file or two that have corresponding <file name="????????.???"> lines (inside of C:\RaysFiles.txt).
I need a VBScript to read though the Ray.txt file for each occurrence of "<file name=".
Then using the value between the beginning and ending double quotes (IE: BLAnnWb4.ocx), look to see if there is a file of the same name, in C:\RaysFolder.
If the file is missing from C:\RaysFolder, a dialog or something, indicating the same, would be great.
I really do appreciate the help with this as I am not a VBScript expert and having such a script, would save me lots of time and help my eyesight as well.
(Cuz I do this process manually now.)
Thanks in advance for any and all efforts on my behalf.
Ray in Wisconsin
Can I ask for some help ?
(I'd really REALLY be grateful for it.)
I have a file, C:\RayFile.txt".
This file contains a bunch of lines.
Interspersed within all the lines are a number of lines that contain the names of objects.
Here's an example of what one of those lines look like:
<file name="BLAnnWb4.ocx">
Now, there is a folder, named "C:\RaysFolder", that is supposed to contain the actual object referenced by each <file name="????????.???"> line, inside of C:\RaysFiles.txt.
But sometimes, C:\RaysFolder is missing a file or two that have corresponding <file name="????????.???"> lines (inside of C:\RaysFiles.txt).
I need a VBScript to read though the Ray.txt file for each occurrence of "<file name=".
Then using the value between the beginning and ending double quotes (IE: BLAnnWb4.ocx), look to see if there is a file of the same name, in C:\RaysFolder.
If the file is missing from C:\RaysFolder, a dialog or something, indicating the same, would be great.
I really do appreciate the help with this as I am not a VBScript expert and having such a script, would save me lots of time and help my eyesight as well.
(Cuz I do this process manually now.)
Thanks in advance for any and all efforts on my behalf.
Ray in Wisconsin
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Pretty close ?
It's PERFECT !
Absolutely PERFECT !
I can't thank you enough.
My eyes, can't thank you enough.
You’re the greatest.
Ray in Wisconsin :)
It's PERFECT !
Absolutely PERFECT !
I can't thank you enough.
My eyes, can't thank you enough.
You’re the greatest.
Ray in Wisconsin :)
Wow, that's about the best feedback ever, thanks so much, and so glad that solution worked out and is helpful.
~bp
~bp
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for rkode's comment http:/Q_27427840.html#37071366
for the following reason:
If I could ward 1,000 points I would do it in an instant.<br /><br />Thanks you so VERY much.<br /><br />Ray in Wisconsin :)
Accepted answer: 0 points for rkode's comment http:/Q_27427840.html#37071366
for the following reason:
If I could ward 1,000 points I would do it in an instant.<br /><br />Thanks you so VERY much.<br /><br />Ray in Wisconsin :)
ASKER
I have been made aware that I selected an incorrect response as the solution.
I really wanted to select ID: 37070979 as the solution.
Can I request help in getting this addressed so that the points can be awarded and the incident closed ?
Thanks in advanced for anything that can be done.
I really wanted to select ID: 37070979 as the solution.
Can I request help in getting this addressed so that the points can be awarded and the incident closed ?
Thanks in advanced for anything that can be done.
ASKER
I hope I can now close this incident.
Thanks.
~bp
~bp
Thank you rkode. Much appreciated.
Rob.
Rob.
ASKER
You are more than welcome Rob.
I was so excited about getting Bill Prew's solution, that I kinda messed things up. (With regards to awarding points and closing the incident.)
Anyway, all is well now.
Ray in Wisconsin :)
I was so excited about getting Bill Prew's solution, that I kinda messed things up. (With regards to awarding points and closing the incident.)
Anyway, all is well now.
Ray in Wisconsin :)
~bp