Hey, Scripting Guy! In Windows PowerShell, how can I determine the number of days difference between two dates? I want to be able to delete all the files in a folder that are more than 90 days old.– JN Hey, JN. You know, today is October 31st and, in the US at least, it’s the…
Year: 2007
Hey, Scripting Guy! How Can I Determine the Age, in Years, of an Office Outlook Contact?
Hey, Scripting Guy! Given the birthday for one of my Office Outlook contacts, how can I tell how old that person is?– JC Hey, JC. We have to tell you, JC, that you initially gave us quite a start with this question. Why? Well, when the Scripting Guy who writes this column sat down to…
Hey, Scripting Guy! How Can I Start a Remote Process Under CScript If the Script Path Contains Blank Spaces?
Hey, Scripting Guy! I’m trying to create a process that runs a script under the CScript script host. However, I keep running into problems because there are spaces in the script path name. How can I use WMI’s Win32_Process class to run a script under CScript when there are spaces in the script path name?–…
Hey, Scripting Guy! How Can I Present a Dialog Box that Allows Users to Rename Files?
Hey, Scripting Guy! How can I present users with a dialog box that enables them to rename a file? Ideally I’d like this to be in a loop of some kind, so that they could rename multiple files without having to restart the script.– ER Hey, ER. Before we begin today we’d like to note…
Hey, Scripting Guy! How Can I Be Notified if an Access Database File Exceeds a Specific Size?
Hey, Scripting Guy! How can I trigger an alert if an Access database file exceeds a specific size?– MA Hey, MA. You know just the other day Microsoft.com posted 100 Reasons You’ll Be Speechless, a Web page listing 100 reasons why “Seeing Windows Vista for the first time may leave you searching for words.” Note….
Hey, Scripting Guy! How Can I Move Files Based on a Value in the File Name?
Hey, Scripting Guy! I have a bunch of files that I need to move to new folders; the folder a given file will be moved to is based on the year, a value that appears in the file name. How can I write a script to move these files?– LP Hey, LP. Before we launch…
Hey, Scripting Guy! How Can I Extract All the Text Between Two Tags in a Text File?
Hey, Scripting Guy! I have a whole bunch of text files in a folder. I need to open each of these files, extract everything between the <filecount> and </filecount> tags, and then write that information to a separate file. How can I do that?– RP Hey, RP. You know, the other day the Scripting Guy…
Hey, Scripting Guy! How Can I Convert a Number to a Date and Then Back in Excel?
Hey, Scripting Guy! We have a spreadsheet that includes numbers like this: 31738. However, this isn’t supposed to be a number, it’s actually supposed to be a date: 11/22/1986. How can I convert these numbers to dates and then, if needed, convert those dates back to numbers?– TC Hey, TC. Yes, as a matter of…
Hey, Scripting Guy! How Can I Retrieve a List of Unique Users from the Security Event Log?
Hey, Scripting Guy! How can I retrieve a list of unique users from the Security event log?– KM Hey, KM. Before we tackle your question we should probably address a question sent in by another reader: Hey, Scripting Guy! Whatever happened to Monday? Having been gone on vacation all last week, I was combing through…
Hey, Scripting Guy! How Can I Tell if a Computer is Bluetooth-Enabled?
Hey, Scripting Guy! How can I tell if a computer is Bluetooth-enabled?– RR Hey, RR. You know, any time the Scripting Guys get asked something like this, one question immediately pops into our minds: “So where did the name Bluetooth come from anyway?” As it turns out, the Bluetooth “personal area networking” protocol was named…