I want to thank everyone who replied for your help. I tested out all of your methods and they all worked, so I gave each one of you a star.
I actually got the answer I was looking for in the MSDN newsgroup, the key word being "RegEx". It was also mentioned in the link that longhair posted...
I don't do a lot of web development, so I'm not sure if any of these methods will work for you but it looks like they may be a little easier if they do.
Using Local System Environment Variables:
set shell = WScript.CreateObject( "WScript.Shell" )
computername =...
I'm just trying to get the same results in VBScript that I would from this DOS Batch script:
@for /f "tokens=3 delims=: " %%i in ('ping -n 1 localhost ^| find "Reply from"') do @echo %%i
Anyone?
I don't think split() is going to work in this case.
The results of the command I'm issuing list the names of target computers that are reporting to a CA Unicenter Software Delivery Staging Server, and then how many. Something like this.
COMPUTER1
COMPUTER2
COMPUTER3
...
Number of target...
I specialize in automation so 90% of everything I do involves using the command line. This task in particular would involve writing SQL queries for a set of highly complexed relational databases for which I have no schema, which would take a lot of time that I simply don't have, as this project...
I have a command that outputs a plethora of information and I only need one word out if it.
In DOS for example, if I only wanted the IP address of a hostname, I'd write two batch files something like this:
getIP.bat
@echo off
for /f "tokens=3 delims=: " %%i in ('parseIP') do echo %1 %%i...
Thanks again. Wow, you're putting a lot of time into this and I really do appreciate it.
Isn't XSL used primarily for displaying information in a web page? Or could it also be used for this purpose? Since I'll be using the data to send to Event Logs, map network drives, connect printers...
Oh yes, very familiar with w3schools and google is my friend. I did all kinds of searches on this, but couldn't find anything specific to what I was trying to do. Most of the XML DOM walking examples/tutorials I could find were dealing with very simple XML files and using Javascript.
I'll...
Hi Josh,
Thanks again. Looks like I was going down a different path. I did manage to locate a specific facitility id based on the gateway, which I was very happy with.
Here's the whole function now:
FindGateway()
Function FindGateway()
Dim strFacid, strUnit, strLocation, strStreet...
Thank you very much for taking the time to help me out.
Yes, there are roughly 900 <facility> elements, and sometimes multiple gateways under each of those. Each <facility> element represents a branch office and some of the larger offices with multiple subnets obviously have more than one...
If you look at the code that I submitted in the thread just before this one, I'm doing an xpath statement and checking the values of each node in a do while statement.
You should be able to do something similar but incorporate a timer instead of comparing each value.
In other words, set a...
Hi, I'm a little new to VBScript and I'm having some trouble traversing an xml file. I've done some C++ xml stuff a while back but I had a different parser. I'm not sure if this should be in the VBScript or XML forum, but here goes. Here's a piece of the xml file.
<facility id="TEST"_FACID>...
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.