Stacking two actions

Comments & Suggestions, if you want a new feature suggest it here
Post Reply
jbs
Posts: 9
Joined: 2015-10-31 10:59:20

Stacking two actions

Post by jbs »

I often want to rename folders that contain both photos and videos. I prefer to use EXIF data for the photos, but the videos don't contain EXIF and so remain unnamed. Videos can be renamed using the "Use Date and Time".

I created an ARB whose first action is to rename all files using date and time. The second action is to rename all files using Exif.

Each line works when I delete the other, but with both of them in there the preview shows no changes. I tested it on some files and it turns out it will work correctly, but you can't see the actions in preview. Is there any reason Preview might fail when stacking actions in this way? And while we're at it is there a better way to do what I'm trying to do?

Thanks as always for the amazing software!!
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,
I think this is due to a bug laying there since long time: Ant Renamer tries to take the exif info from the file after having changed the name using date & time, but as it didn't actually do that change yet (because it is just for the preview), it can't find the file.
For the preview it should use the original name and not the name generated at the previous step.
There are other small bugs related to that either in that preview column or in the preview shown on the Actions page, when involving Exif or mp3 actions (those that need to access to the file contents).
Still on that subject, the Undo could be also improved when combining actions.
All these are related and I more or less know how I could fix that: it is on my to-do list so there is hope that someday this is fixed... The only problem is that I do not know when ;)
jbs
Posts: 9
Joined: 2015-10-31 10:59:20

Post by jbs »

Thanks for the explanation, makes total sense.

Fortunately I have so much faith in your software that I'm using it this way even sans preview.

This has been on *my* todo list for awhile and I think I finally have my be all end all photo and video renaming sequence. The arb looks like this:

>>>>>>Image

It first gets everything named in the exif datetime format but using file modified dates and times. Then, for the files that have EXIF data it renames it in that same format, adding subseconds (to later distinguish burst images with the same second).

Then since the first 16 characters are all the same format for videos and jpgs it goes through standardizing the hyphens, spaces and underscores to get everything to the format yyyy_mmdd_hhmmss. For videos, next comes the extension, for photos next comes _sub_subsectime.jpg.

Then I attempt to delete all the characters after _sub_. For photos with unique timestamps that happens, for others it deletes the subsectime from the first but leaves the rest.

Finally I replace the _sub_ on the images with uniqu timestamps and replace the _sub_ with just an underscore on the others.

Wheww. Now I have no excuse for not having my photos organized!

As always, I'm keen to know of better ways to do this. I didn't see any individual exif fields (month, year, day, hour, etc) or else I could eliminate steps 3 through 7.

Thanks!
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Splitting the exif date & time into several fields is also on my to-do list :D
Using regular expressions you may possibly get it done in fewer steps, but they are not easy when you're not used to these.
jbs
Posts: 9
Joined: 2015-10-31 10:59:20

Post by jbs »

I've used Regex from time to time and whenever I do I realize how amazing it is, but it's still pretty foreign so I didn't use it here. I'll put that on *my* todo list. ;-)

The only downside to the many steps is that if I remember/understand correctly the undo usually only applies to the last step. I often thought it would be a cool optional feature (though possibly programmatically more complex than I realize) to kick out a batch file in a subdirectory of the AntRenamer program directory each time an operation runs. The batch file could just be a series of single lines

rename "c:\path\newname" "c:\path\oldname" referencing the initial and final name of each file in the files list. You could timestamp them and just leave them there (they'd be pretty tiny) but if someone ever goofed and wanted to go back -- even if they'd closed the program -- they could just go to the last batch file and get everything back to the names before the last operation.

--Jason
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I mentioned the improvement of undo in a post here above ;)
(indeed it only undoes the last step)

Generating a batch file is _also_ on my to-do list :D
(either for undo or just for "later renaming" after having planned all the actions for example)
Post Reply