Showing tag results for text files

Apr 13, 2005
Post comments count0
Post likes count0

How Can I Eliminate Duplicate Names in a Text File?

ScriptingGuy1

Hey, Scripting Guy! I have a text file that contains a bunch of names. How can I read through that text file and eliminate all the duplicate names?-- MW Hey, MW. We’re assuming you have a text file that looks something like this:Ken Myer Dean Tsaltas Jonathan Haas Ken Myer Dean Tsaltas Syed Abbas Gail Erickson Carol Phillips Dean Tsaltas Dylan M...

Scripting Guy!scripting techniquesVBScript
Mar 28, 2005
Post comments count0
Post likes count0

How Can I Add a Word to a Text File if That Word Isn’t Already in the File?

ScriptingGuy1

Hey, Scripting Guy! How can I check a text file to see if a word appears in that file and, if it doesn’t, add the word to the file?-- JO Hey, JO. We seem to have gotten quite a few questions on this topic lately. You mentioned adding words to a custom dictionary for Microsoft Word; other people mentioned adding an entry to an LMHosts file or som...

Scripting Guy!scripting techniquesVBScript
Mar 25, 2005
Post comments count0
Post likes count0

How Can I Write Double Quotes to a Text File?

ScriptingGuy1

Hey, Scripting Guy! I’m using the FileSystemObject to create an XML file. However, I need to put double quote marks around some of the items in that file. How do I do that?-- JP Hey, JP. According to your email, you’re trying to write the following line to your XML file:<? xml version = "1.0" encoding = "UTF-8" ?> However, you’re getting ...

Scripting Guy!scripting techniquesVBScript
Feb 25, 2005
Post comments count0
Post likes count0

How Can I Sort the Contents of a Text File?

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 sort a tex...

Scripting Guy!scripting techniquesVBScript
Feb 23, 2005
Post comments count0
Post likes count0

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

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