Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Retrieve Information About All the Shortcut Files in a Folder?

(image) Hey, Scripting Guy! I have a folder with about 1800 shortcuts in it. I need to retrieve the file name and the target for each of these shortcuts in order to import that information into a database. Do you have any idea how I can retrieve this information for each and every shortcut file in a folder?-- JK(image) (image) (image) HeYy...

Hey, Scripting Guy! How Can I Return a List of All the Folders Whose Name Starts With a Specified String Value?

(image) Hey, Scripting Guy! How can I find all the folders that start with a specific string? For example, given the string 123 the script would find folders 123000 through 123999.-- MD(image) (image) (image) Hey, MD. Here in the US we’re still busy trying to figure out who’s going to run for President. (Figure out who will actually be...

Hey, Scripting Guy! How Can I Write a Message to All the Empty Files in a Folder?

(image) Hey, Scripting Guy! I need to search a certain directory for files with a size of 0 KB, then replace the non-existent text in those files with an error message like this one: "File did not save correctly." I have been searching for the answer myself and can't seem to grasp it. Can you help me on this one?-- CE(image) (image) (image...

Hey, Scripting Guy! How Can I Change a File That’s Found in a Folder and in All Its Top-Level Subfolders?

(image) Hey, Scripting Guy! I need a little help. I have one top folder with many subfolders ; the subfolders are all top-level subfolders like C:\Scripts\Folder1 and C:\Scripts\Folder2. In each subfolder I have a text file with the same name. I need to open that text file in each folder and change a couple of characters. Is there any way ...

Hey, Scripting Guy! How Can I Search For a Folder and Return the Folder Path?

(image) Hey, Scripting Guy! How can I search a computer for a folder, and return the folder’s complete path?-- AW(image) (image) (image) Hey, AW. We know a lot of you have been sitting on pins and needles, waiting for this announcement, so we won’t waste any time: yes, the Scripting Son has officially been accepted by the University of...