Showing results for retrieving input - Scripting Blog [archived]

Sep 15, 2004
0
0

How Can I Use Both Command-line Arguments and a Default Value?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’d like to have a script that accepts computer names as command-line arguments and then runs against each of those computers. However, if you don’t enter any command-line arguments, I’d like it to default to running against the local computer. Can you help me out here?-- TS Hey, TS. Sure, we can help you out here. Let’s say yo...

Scripting Guy!scripting techniquesVBScript
Sep 9, 2004
0
0

How Can I Read in IP Addresses and Use Them in a Script?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a text file that contains a bunch of IP addresses. I’d like to be able to read these addresses from a script, and then use them to connect to those computers. Is that possible?-- RL Hey, RL. You bet you can do this, and here’s how. First, make sure your text file looks something like this, with each IP address on a si...

Scripting Guy!scripting techniquesVBScript
Aug 6, 2004
0
0

How Can I Use Long File Names as Parameters?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m trying to run a command-line tool from a script, but I need to pass it a long file name like C:\Documents and Settings\All Users\Desktop\logfile.txt. No matter how I try to pass that file name, however, my script blows up on me. Help!-- WK, Birmingham, Great Britain Hey, WK. Ah, yes: you’ve encountered the dreaded double do...

Scripting Guy!scripting techniquesVBScript