Set the albums date by a shell script

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Set the albums date by a shell script

Matthieu
Dear users,

My pictures are stored in a directory tree like this example:

2011
 |-----20111111
 |-----20111225
2012
 |-----20120301
 |-----20120301

For sure this structure should be efficient to sort my albums by location in the left panel, but only if I did not made some mistakes in some folder names.
I could rename them but it's not so simple because this directory tree is share with some others softwares.

So I would like to sort my album by their dates. But when we have more than 1000 folders, I don't wants to do that manually.

I've analyzed the database schema and I have found that there is a field called date in the album table. Nice!
So I build a shell script which analayse my folders names to build the appropriate SQL updates.
And I have applied these updates....

But for sure, If I write you it's because I had some issues: after applying the SQL updates, almost all my folders had now the appropriate date in the date field.
But some folders have disappear from the directory tree on the left panel.

So my question is: are there some triggers in database or on the software code source which can explain why these folders have disappear? or If I update the date field in the album table it's like setting the album date from the left panel?

Kind regards

Matthieu