As part of research for a book on vintage port, I am taking many photos of dinner menus and pages of cellar books. The camera is a DSC-W180, which names files DSC0nnnn.JPG (eg, DSC01234.JPG). Alas, the camera can’t count past 9999, it then going back to 1. Whoops.
What is wanted is to rename from “DSC0nnnn.JPG” to “DSC1nnnn.JPG” those of the selected files that were created after 21:59 on Sun 26 Sept 2010. This gives rise to two questions.
â—Š 1. How can one attach to the Finder a button or keystroke or menu item or something that will execute a script?
â—Š 2. How would one script something like the following pseudocode (in which ˜¢’s represent tabbed indentation):
¢ For All Selected Files
¢¢ If FileName is of the format “DSC0nnnn.JPG” Then
¢¢¢ If FileCreationDate is >= 21:59 on Sun 26 Sept 2010 Then
¢¢¢¢ Rename file to “DSC1nnnn.JPG”.
¢¢¢ End If
¢¢ End If
¢ End For All
OSX 10.6.4; iMac 5,2; Xcode 3.2.4 is installed.
Thank you kindly.
I don’t know whether it is permitted to mention that a similar question was asked on forums.macrumors.com/showthread.php?t=1024189. Presumably if it isn’t an admin will delete this ¶.
PS: when it is working, I promise to paste the full code into this thread.