Scripting Blog

A place to learn about PowerShell and share stories of automation

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

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 HeYy, JK. WwEELL, PRobbaly THe bESS...

Hey, Scripting Guy! How Can I Incrementally Rename Files Based on the File Creation Date?

Hey, Scripting Guy! I am trying to get my photos sorted in chronological order, even though – because they come from different cameras – they have different names. For example, one name type starts with DSC followed by a sequential number issued by one camera; another name type starts with IMG followed by a different sequential number. I...

Hey, Scripting Guy! How Can I Change the Last-Accessed Date of a File to Match Its Last-Modified Date?

Hey, Scripting Guy! How can I change the last-accessed date for all the files in a folder? I want the last-accessed date to match the date and time that the file was last modified.-- GW Hey, GW. Say, did you realize that yesterday was Opening Day for Major League Baseball? If you didn’t, well, don’t feel bad; even the Scripting Guy who ...

Hey, Scripting Guy! How Can I Standardize the Logon Name for All My Users?

Hey, Scripting Guy! My company would like me to change our Active Directory logon names from this format – kmyer – to this format: Ken.Myer. Is there a way I can script all these changes?-- DO Hey, DO. You know, sometimes the Scripting Guy who writes this column implies that he leads a dull and drab life, that nothing exciting ever ...

Hey, Scripting Guy! How Can I Add a Hotkey to an HTA Button?

Hey, Scripting Guy! How can I add a hotkey to a button in my HTA?-- TM Hey, TM. As usual, the Monday column is being written on Friday; however, the Scripting Guy who writes this column is having far more trouble getting things done than he usually does. That’s because today is day 2 of the NCAA basketball tournament (“March Madness...

Feedback usabilla icon