The 2011 Scripting Games Advanced Event 8: Use PowerShell to Remove Metadata and Resize Images

The 2011 Scripting Games Advanced Event 8: Use PowerShell to Remove Metadata and Resize Images

  • Comments 1
  • Likes

2011 Scripting Games badge

Summary: Advanced Event 8 in 2011 Scripting Games uses Windows PowerShell to remove metadata from image files and to resize those images.

About this event

Division

Advanced

Date of Event

4/13/2011 12:15 AM

Due Date

4/20/2011 12:15 AM

Event scenario

You have a number of pictures stored in a series of folders. Some of the images have a lot of metadata associated with them, others do not. You are planning to share some of the pictures with friends, but because the images are extremely large, you need to resize them to a size that is suitable for email. You would like to be able to remove all metadata from files that you want to share. You decide to create a script that will show a graphical interface displaying a picture on one side and the metadata associated with the picture on the other side. The graphical interface should also contain a button that is named something like Prepare to share. When clicked, this button will resize the image, remove all of the metadata associated with the file, and save the new file under a new name that prepends the word SHARE and an underscore in this fashion: SHARE_originalfilename.

Design points

  • You are free to use existing modules, controls, and so on that are freely available; however, you cannot provide a solution that requires commercial non-Microsoft software. But if you take an external dependency in your solution you MUST check for this requirement in your script.
  • You are free to use any approach you wish to create your graphical solution.
  • Extra points for offering to automatically download and install any external dependencies.
  • Your solution should allow the user to set the initial folder to gather the images.
  • Your solution should allow the user to set a different folder to save the SHARE_ images.
  • Extra points for adding a graphical folder picker to allow the user to select the initial folder.
  • Extra points for remembering configuration preferences.
  • Extra points for allowing the user to easily process all of the files in the initial folder.

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.

Ed Wilson, Microsoft Scripting Guy

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Reviewing september 2009 articles; Powershell GUI week.  Time to put the big boy undies on.