Showing results for February 2005 - Scripting Blog [archived]

Feb 28, 2005
0
0

How Can I Determine if a Users’ Folder Exists on a Computer?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I determine if the C:\Documents and Settings\%username%\Application Data\Microsoft\Templates folder exists on a computer?-- JM Hey, JM. The FileSystemObject includes a FolderExists method that makes it very easy to check for the existence of a folder. Just pass FolderExists the complete path to the folder and you’ll...

Scripting Guy!VBScriptstorage
Feb 25, 2005
0
0

How Can I Sort the Contents of a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a text file that contains a list of computer names. How can I sort that file alphabetically?-- LR Hey, LR. If we wanted to take the easy way out we’d just tell you, “Sorry, you can’t do that.” And we could get away with that because none of Microsoft’s scripting technologies feature a way to open up and then ...

Scripting Guy!scripting techniquesVBScript
Feb 24, 2005
0
0

How Can I Write Binary Data to the Registry?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I write binary data to the registry?-- FG Hey, FG. WMI’s Standard Registry Provider includes a method - SetBinaryData - that makes it relatively easy to write binary data to the registry. There’s one little catch to be aware of, but we’ll let you know what that is. First, though, let’s take a look at a script ...

Scripting Guy!VBScriptoperating system
Feb 23, 2005
0
0

How Can I Read Text From a File and Then Rename the File Using the Text I Just Read?

ScriptingGuy1
ScriptingGuy1

Guy! I would like to be able to open a file, read the first 10 characters, and then rename the file to those 10 characters plus a .txt file extension. How can I do that?-- KA Hey, KA. Ah, for once a text file question that can be answered without some weird and convoluted workaround. This is actually pretty easy: we can use the FileSystemObject to...

Scripting Guy!scripting techniquesVBScript
Feb 22, 2005
0
0

How Can I Tell Whether a Web Page is Accessible?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I tell whether or not a Web page is accessible?-- JW Hey, JW. To tell you the truth, these are the kinds of questions we hate, questions where we don’t know the answer off the top of our heads but where it seems like there ought to be a way to do this. Sometimes in the world of scripting the hard things turn out to ...

Scripting Guy!scripting techniquesVBScript

Feedback