Showing tag results for text files

Nov 16, 2004
Post comments count0
Post likes count0

Can I Read an Entire Text File Rather Than Reading It Line-by-Line?

ScriptingGuy1

Hey, Scripting Guy! Right now I use a script to open a text file containing computer names. The script reads the first line of the file and connects to that computer, then reads the second line of the file and connects to that computer. Is there a way to store those names in a variable or something, so that I don’t have to keep reading the text f...

Scripting Guy!scripting techniquesVBScript
Oct 18, 2004
Post comments count0
Post likes count0

How Can I Pick Out and Save Specific Lines in a Text File?

ScriptingGuy1

Hey, Scripting Guy! I’d like to be able to read through a text file, select the lines that begin with a particular word (like Failure), and then save only those lines back to the same text file. Is there any way to do that?-- AC Hey, AC. Hey, AC. For simplicity’s sake, we’re assuming you have a text file that looks similar to this:Success - Oper...

Scripting Guy!scripting techniquesVBScript
Oct 12, 2004
Post comments count0
Post likes count0

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

ScriptingGuy1

Hey, Scripting Guy! How can I count the number of lines in a text file?-- MS Hey, MS. It’s easy to tell that Microsoft’s scripting technologies weren’t written by people who do system administration for a living. Our scripting technologies are jam-packed with features and capabilities, yet we always seem to missing the things that people really ...

Scripting Guy!scripting techniquesVBScript
Oct 4, 2004
Post comments count0
Post likes count0

How Can I Print Text Files Using a Script?

ScriptingGuy1

Hey, Scripting Guy! I have a bunch of text files in a folder. Is there a way to print those files using a script? I know I can use Microsoft Word to print the files from a script, but I don’t have Microsoft Word installed on that computer.-- MA Hey, MA. Don’t tell anyone from Microsoft we said this, but that’s OK; you don’t need Microsoft Word j...

Scripting Guy!scripting techniquesVBScript
Aug 17, 2004
Post comments count0
Post likes count0

How Can I Save Output to a Text File?

ScriptingGuy1

Hey, Scripting Guy! Is there an easy way to save my script output to a text file rather than displaying it on screen? -- KP, Ogden, UT Hey, KP. If you always want your script to save data to a text file rather than display it on screen, then you’re probably better off using the FileSystemObject and its file-writing capabilities. However, it appear...

Scripting Guy!scripting techniquesVBScript