
I have folders named like 2014-JAN for a YEAR-MON combination. Because these don't sort right, I want to mass rename them to 2014-01 or YEAR-NN.
I know there has to be a way to do this in a single command on the command line using FOR, but can't think of the right logic. Any help?
So far I've thought about iterating through each year using for, then each month using for, but I'm getting stuck on how I would get the right digit for the month associated with the original month name. I'm sure there may be a way to iterate through the months first, and then repeating that for each year, but I run into the same problem in logic of how to associate month names and days.
Any assistance appreciated.