Google

2009-08-23

Time to give PowerShell another try

Today, I transferred our pictures and videos from the weekend to my PC and then diligently started tagging them... I accumulated more than 10K pictures @year since my daughter was born. It's clear that I need a lot of Tagging to do. Then it occurred to me that I could possible use the folder structure I've been using to do some of the tagging.

I use the following structure for media files

Root |
|Audio
|Video
|Pics
| {Year}
|{Month}
|{Event}


So, I could probably tag all my pics with at least year and month information and possibly add event too... and I thought PowerShell should be perfect for such file manipulations. There is a slight problem though. I am not sure how to code it... Well that brings us to our subject matter.

I was very excited when MS announced MSH (Microsoft Shell), which later was renamed to PowerShell. The moment I heard that it did not have any remote capabilities, I thought it would not go far. I still wanted to give it a shot but syntax was terse; I did not like it.

Windows 7 is out with PowerShell 2 and I have changed my mind about it; I think it's time to give it another try. There are a couple of reasons I think it's valuable to learn it:
  • Resources are not scarce: There is now a large enough community coding in powershell; which means it's possible to find resources
  • .Net!: I've been reading 'learning C#' books, and understanding whole that .net world makes understand PowerShell easier. It works the other way too.
  • MS Emphasis on PowerShell: Microsoft seems to be going full speed in making Powershell the premium scripting language for all products as well as OS.
  • It really is powerful: The more I read about it, the more I understand how powerful it is. Well, I still do not like the syntax but I am used to Perl; I am sure I can get used to it too :p
No, I have not yet figured out the language fully, although I am more comfortable with it now that I read some material. I encountered Keith Hill's blog, there are tons of useful material there and even better, he has compiled his "Effective Windows Powershell" posts into a single pdf file. I just finished reading it and found it quite useful.

I will probably post the solution I come up with about the original tagging issue, but right now I am just trying to take in as much as I can before going all out scripting. Who would think PowerShell could be fun too? :p
Post a Comment