Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Determine If Any of the Files in a Folder Have Been Modified in the Past 90 Days?

(image) Hey, Scripting Guy! On my file servers I periodically want to check a folder to see if that folder or any of its subfolders have files that are no longer being updated. What Iโ€™d like to do is check each file in each folder to see if theyโ€™ve been modified in the past 90 days. If I find a folder in which none of the files have been...

Hey, Scripting Guy! How Can I Remove Duplicate Values From a Pair of Text Files?

(image) Hey, Scripting Guy! I have two text files that contain numbers. I need to write a script that can determine whether a given number exists in both of these text files. If it does, I need to delete that line from each of the two files. How do I do that?-- KT(image) (image) (image) Hey, KT. Before we get started today, we have a ...

Hey, Scripting Guy! How Can I Change the Background Color of a Text Box?

(image) Hey, Scripting Guy! I have an HTA that we use for data entry. On this form, some of the fields are mandatory and some of them are optional. Iโ€™d like to indicate the mandatory fields by making those text boxes a different color than the text boxes used for the optional fields. How do I do that?-- IU(image) (image) (image) Hey, IU...

Hey, Scripting Guy! How Can I Delete Files That Are a Specified Number of Hours Old?

(image) Hey, Scripting Guy! Iโ€™ve seen scripts that let you delete all the files in a folder that are X number of days old. I have a different problem: Iโ€™d like to delete files that are X number of hours, or even X number of minutes, old. How can I do that?-- DF(image) (image) (image) Hey, DF. Did you see where some researchers are ...

Hey, Scripting Guy! How Can I Replace Text That Includes Double Quote Marks and a Tab Character?

(image) Hey, Scripting Guy! I read one of your columns on replacing text in a file and I found it very useful. However, I have a somewhat more-complicated need: I want to replace text that includes both double quote marks and a tab character. How can I do that?-- FC(image) (image) (image) Hey, FC. Your know, as anyone whoโ€™s ever read Hey...