Showing results for FileSystemObject - Scripting Blog [archived]

May 3, 2006
0
0

How Can I Remove Blank Spaces Before and After a String Value?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! We have a custom in-house application that writes data to a log file. The problem is that the data often has a bunch of blank spaces before and after it. How can I remove all the blank spaces that come before and after my data?-- KS Hey, KS. You might find this hard to believe, but the Scripting Guy who writes this column occ...

Scripting Guy!scripting techniquesVBScript
Apr 27, 2006
0
0

How Can I Print Just the Text Area of an HTA?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have an HTA where information gets written to a text area. How can I print just the information found in that text area?-- DS Hey, DS. We want you to level with us here: are the Scripting Guys dead? We ask that because we saw the movie The Sixth Sense a few years ago and we understand how this life/death thing works. If you...

Scripting Guy!scripting techniquesVBScript
Apr 19, 2006
0
0

How Can I Open a Text File as Unicode?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have some text files that include Unicode characters. When I try to open those files using a script all I get back is gibberish. How can I open a text file as Unicode?-- FA Hey, FA. You know, the truly great magicians don’t concoct elaborate tricks that rely on trap doors, secret panels, and huge puffs of smoke to hide what...

Scripting Guy!scripting techniquesVBScript
Apr 3, 2006
0
0

How Can I Count the Number of Words in a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I count the number of words in a text file?-- LA Hey, LA. You know, this is one of those questions where the Scripting Guys outsmarted themselves. (Not that outsmarting the Scripting Guys is particularly hard to do, mind you.) For one thing, we’re writing this column on a Friday, and we always look for an easy way out...

Scripting Guy!scripting techniquesVBScript
Mar 3, 2006
0
0

How Can I Read Just the Last Line of a Text file?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I read just the last line of a text file?-- BM Hey, BM. You know, if you’ve ever wondered how Hey, Scripting Guy! differs from other daily columns (like, say, Dear Abby), well, here’s one way. Suppose someone writes Dear Abby and says this: Dear Abby:My life is all messed up and I need to do something about it. How ca...

Scripting Guy!scripting techniquesVBScript