Peters Flexible RenAmiNg Kit (PFrank) Forum Index Peters Flexible RenAmiNg Kit (PFrank)
Support and Discussion Site for the PFrank File/Folder Renaming Tool (***NEW HOME PAGE*** "http://pfrank.atwebpages.com")
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A Challenge

 
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions
View previous topic :: View next topic  
Author Message
GHammer



Joined: 10 Mar 2007
Posts: 3

PostPosted: Sat Mar 10, 2007 5:00 am    Post subject: A Challenge Reply with quote

I have gotten stumped and hope someone can assist me.

I have a need to change the date on directories to the date of the newest photo in the directory. All the photos have EXIF info, so the data is available.

The need is for the directories to have the date/time of the newest photo, and for that info to carry up the tree.

Here's a quick example:
Code:
Photos  01/01/2006
  Sub1  11/11/2003
    Sub1a  09/10/2006
    Sub1b  12/31/2006
  Sub2  02/01/2007


The desired dates would be:
Code:
Photos  02/01/2007
  Sub1  12/31/2006
    Sub1a  09/10/2006
    Sub1b  12/31/2006
  Sub2  02/01/2007


As I said, I'm stumped. Best I can get is to set directories to their own latest photo date but can't carry it up the tree as needed.

Thanks for any help!
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sat Mar 10, 2007 7:38 am    Post subject: Reply with quote

I need to get clarification on one thing. Do you want to change the last modified dates of the folders or do you want to change the names of the folders to reflect the newest dates as you have outlined?

If you want to change the last mod. dates, then PFrank isn't really suitable for that. You could use the user-defined command feature to essentially write the program to modify the last modified dates but you wouldn't be able to preview or manually control anything that the user command does.

If you want to change the folder names to reflect the dates, then the user-defined command feature is perfect for this. I can post an algorithm if this is what is desired.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GHammer



Joined: 10 Mar 2007
Posts: 3

PostPosted: Sat Mar 10, 2007 11:14 am    Post subject: Reply with quote

Hello,

Thanks for the reply.

Yes, I need to change the dates of the directories, not rename them according to date.

I had hopes for this tool as I have used it a long time and it has never failed me yet. When it did, it proved to be my limitation, not the tool.

An external command would be fine as it is straight forward, set the parent's date to the newest date of any image.

No chance for dupes, etc.
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sun Mar 11, 2007 1:02 am    Post subject: Reply with quote

What's being asked for isn't file renaming. As pointed out before, it can be done with the user-defined command feature but only because that feature can be used to do anything whether it's related to renaming or not! PFrank does provide a file properties setting feature but was added because it was fairly inexpensive to do so given the infrastructure that was already set up for renaming. This properties setting feature is, however, fairly basic and doesn't provide the type of complexity required here and there are no plans at this time to add any since I'm busy enough just dealing with renaming features.

I'll provide an algorithm (see below) and can provide some assistance if required but because this is not trivial (not that hard either) and is not related to renaming, this would be as far as I am inclined to go with this one. I can of course always be bribed into implementing this feature; you should contact me in private (via email) if you would like to pursue this avenue.

Here is an example Algorithm:

1)
use PFrank to select all the folders of interest (with recursive folder feature enabled).

2)
set up a user-defined command to handle the renaming.
As each folder name is processed, the user command would have to scan the folder name for image files, use an exif utility call to obtain the most recent date, and remember the most recent date for each folder.

Action item would be for me to provide the imported file name and function call for obtaining exif dates.

3)
When the last folder name is processed (there is already a parameter available in the template that can be used to determine the last file), then you could at this point go through the list of folders that had images and adjust their dates.

You mentioned that you had a way to do this already. Was this using PFrank? because if it is then I'd be amazed that it could do this already.

4)
That takes care of all the folders with images. Now you have to look at the parent folders of those folders.
You'd have to scan the parents of each folder and make decisions on whether to adjust their dates based on the sibling data.

5)
There would be no use of the renaming preview window with this implementation. The scan process would result in dates being changed.

If you have any programming experience I'd encourage you to write the program. As mentioned earlier, I can assist if you need some help.
If you would like me to do all the development, then as mentioned before, you can contact me via email.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GHammer



Joined: 10 Mar 2007
Posts: 3

PostPosted: Sun Mar 11, 2007 3:21 am    Post subject: Reply with quote

Thanks for the clear, although negative, reply.

I had written a draft in Java to test retrieving the EXIF info and renaming.
I can clean and extend it to do the job, but was hoping a tool I use often had the ability to do this instead of a one-off app.

You know, when I first started looking at this, I thought "Gee lots of people have digital cameras there should be some management tool that can do this". But, nothing has the ability. No file manager, no image processing or cataloging app, no renamer.

Anyway, yours is still the most powerful tool in my kit and when its needed, nothing else will do. Glad to see your forums up and running. I expect it will become a good resource for regex as your users begin using it.
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 09 Mar 2007
Posts: 448
Location: Canada

PostPosted: Sun Mar 11, 2007 8:06 am    Post subject: Reply with quote

Didn't mean to come across as negative.
I just wanted to add that if you already have Java experience, then it shouldn't be too hard to adapt to python. If you ever do decide to write a user-defined command to handle the folder date settings and need some help, then let me know.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Peters Flexible RenAmiNg Kit (PFrank) Forum Index -> Regular Expressions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own Video Sharing Site

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com