Hey guys, long time no see.

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
mbrierley@gmail.com
Posts: 1
Last visit: Wed May 16, 2007 6:50 am

Hey guys, long time no see.

Post by mbrierley@gmail.com »

I've been out of the scripting game for a while now, but have been asked what I would think is a pretty simple thing. I need to do the following:

1. read the local services file
2. append lines to the file if they do not exist.



Anyone have a quick fix or direction?


Mike
User avatar
abqbill
Posts: 138
Last visit: Mon Sep 28, 2020 1:20 pm

Hey guys, long time no see.

Post by abqbill »

Hi mbrierley@gmail.com,Another possibility is to use findstr to search the file, and use "echo whatever >> services" to append if the text was not found.HTH,Bill
This topic is 16 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked