Change the modified date of a folder to match oldest file
Posted: Tue Sep 10, 2013 6:42 pm
Ok there is something I need to do, and I can only hope that BRU can do it for me.
Here's what I would like to do for each and every sub-folder in my structure:
-Go in the first folder
-Scan the files and find the oldest one
-Change the creation date of the folder to match the file's creation date
-Go to the next folder and repeat
***CONTEXT for those who are interested***
Over the last 12 years I have taken lots and lots of picture with my digital cameras. What I've been doing all this time was unload my pictures to a folder, name that folder to something significant and put it all in a flat structure in my "Photos" folder. As this "Photos" folder grew, it was moved from drive to drive, and now is in a bigger structure replicated on 3 NAS shares and backup-up on Blu-Ray's.
The problem is that over time as I copied the file structure the folder creation dates changed from when they were originally created to when they were copied. Therefore all my "older" folders have the same date, from they day I copied them over. Right now if I use Picasa I don't have to worry about that because the files are automatically sorted by the photo creation date, no matter what is the folder's creation date they're in. However, using XBMC for instance, I can't order the picture chronologically because it uses the folder creation date to sort.
The final goal of this operation is to be able to sort all the folders by creation date, that way I would have my folders in the order the photos were taken, all that without changing the files or folders names.
Here's what I would like to do for each and every sub-folder in my structure:
-Go in the first folder
-Scan the files and find the oldest one
-Change the creation date of the folder to match the file's creation date
-Go to the next folder and repeat
***CONTEXT for those who are interested***
Over the last 12 years I have taken lots and lots of picture with my digital cameras. What I've been doing all this time was unload my pictures to a folder, name that folder to something significant and put it all in a flat structure in my "Photos" folder. As this "Photos" folder grew, it was moved from drive to drive, and now is in a bigger structure replicated on 3 NAS shares and backup-up on Blu-Ray's.
The problem is that over time as I copied the file structure the folder creation dates changed from when they were originally created to when they were copied. Therefore all my "older" folders have the same date, from they day I copied them over. Right now if I use Picasa I don't have to worry about that because the files are automatically sorted by the photo creation date, no matter what is the folder's creation date they're in. However, using XBMC for instance, I can't order the picture chronologically because it uses the folder creation date to sort.
The final goal of this operation is to be able to sort all the folders by creation date, that way I would have my folders in the order the photos were taken, all that without changing the files or folders names.