Showing tag results for text files

May 6, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Search for a Word in a Text File and Return the Entire Line Where That Word Was Found?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a scenario in which I need to read a list of names from a text file. I then need to search for each of those names in a second text file; if a name is found I need to extract the entire line in which that name appears. I’ve figured out how to search for a name in a text file, but I can’t figure out how to extract the en...

Scripting Guy!scripting techniquesVBScript
May 1, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Sort a Text File Based on a Specific Column in That File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a text file composed of many different lines; each line has a number of fields, with the fields separated from one another by a tab character. I need to sort this text file based on the value of one of these fields. How can I do that?-- IR Hey, IR. You know, that’s an interesting question, if only because – oops, hold ...

Scripting Guy!scripting techniquesVBScript
Apr 30, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Read a Text File and Extract All the Text Enclosed in Double Quote Marks?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m trying to write a script that can extract all the values found between a set of double quote marks. I know how to read the text file, and I know how to output any information that I find. However, I can’t figure out how to extract all the characters between a set of double quote marks. Can you help?-- TM Hey, TM. Before w...

Scripting Guy!scripting techniquesVBScript
Apr 29, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine the Number of Lines in a Text File?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’m using Windows PowerShell to determine the record count (i.e., the number of lines) in a text file I just created. If the file has 2 lines, no problem; my script reports back a value of 2. If the file only has 1 line, however, I get back what looks to be the number of characters in the file. In other words, when I run the s...

Scripting Guy!Windows PowerShellscripting techniques
Apr 19, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Parse a Text File and Retrieve All the Information Contained Within Square Brackets?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I need to parse through a text file and extract the information contained within square brackets. So far, however, I haven’t been able to figure out how to do this; that’s because the data isn’t stored on separate lines in the file. Can you help?-- EI Hey, EI. Well, today is Friday, April 18th, the day the National Basketball...

Scripting Guy!scripting techniquesVBScript