Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Change a Read-only File to a Read-write File?

(image) Hey, Scripting Guy! How can I change a read-only file to a read-write file?-- WR(image) (image) (image) Hey, WR. We don’t mean to shock you, but how can you change a read-only file to a read-write file? Why, by using a script, of course! We know: you never saw that coming, did you? As a matter of fact, you can use this script, ...

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

(image) 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(image) (image) (image) Hey, AC. Hey, AC. For simplicity’s sake, we’re assuming you have a text ...