Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Australian Dispatch #3: Self-Contained Underwater Breathing Apparatus

Cold. My nose is cold. My left eye opens slowly to investigate. Everything is dark. Cold and dark. "So why am I awake," I wonder seemingly to myself. No answers are forthcoming. So my right eye slowly opens to bring a modicum of assistance to the ongoing investigation. Still no answers present themselves. Where am I? What country am I in? "...

Hey, Scripting Guy! How Can I Prompt a User for Information and Then Pass That Information to a Command-Line Tool?

Hey, Scripting Guy! How can I prompt a user for information and then pass that information to a command-line tool?-- SD Hey, SD. efh;r9d/fjwf Sorry; let’s try that again. j ewewrj 2gr CX # 2kkkkw Sorry; the Scripting Guy who writes this column is having a little difficulty moving his arms today. Last night the Scripting Son thought it ...

How Can I Repeatedly Prompt a User to Enter a File Name?

Hey, Scripting Guy! I have approximately 100 Excel files (all with names like 9365.xls) in a folder. I’d like to prompt a user for a file name, open the file, retrieve information from a specified cell, then close the file (ideally Excel would never appear on screen). I’d then like to prompt the user to enter another file name. How can I...

How Can I Clear the Contents of Any File Dropped on My Script Icon?

Hey, Scripting Guy! How can I write a script that will clear the contents of any file that I drag and drop on the script icon?-- SN Hey, SN. Say, you didn’t by any chance misplace a few hundred thousand insects did you? OK; just thought we’d ask. This past weekend the Scripting Guy who writes this column had to drive across the state to...