Pardon my ignorance. I figured it out. I modified my regex statement so that it took into account variable values:
objRegEx1.Pattern = "maxconnect.+?\x22$
So, I've got a script that reads multiple config files for matches (maxconnection) and then outputs if it found a match or not.
I want to visually confirm the match to verify settings in the file:
<add address="*"
maxconnection="2"
/>
This should output as...
Thanks for that.
It does make more sense to use the folder name rather than path. I was going to create an if...else statement to handle different path lengths but this is so much simpler.
I figured it out, I wasn't accounting for all the characters in the path:
Set filesys = CreateObject("Scripting.FileSystemObject")
Set winPath = filesys.GetSpecialFolder(0)
strPath = winPath & "\Microsoft.NET\Framework"
Set folder = filesys.GetFolder(strPath)
Set sfolder = folder.SubFolders...
OK, this is what I have so far:
Set filesys = CreateObject("Scripting.FileSystemObject")
Set winPath = filesys.GetSpecialFolder(0)
strPath = winPath & "\Microsoft.NET\Framework"
Set folder = filesys.GetFolder(strPath)
Set sfolder = folder.SubFolders
For Each f1 in sFolder
If...
I have created a script that successfully searches a single text file and outputs a regex match. What I am need assistance with is searching MULTIPLE text files in .NET Framework directories, rather than creating multiple statements for each possible iteration.
This is similar to this post:
http://www.tek-tips.com/viewthread.cfm?qid=1168363&page=1
I've written a script that will search a machine.config for various strings. It has just occurred to me that there might be varying installs of .NET Framework.
This is what I need to do:
Search under...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.