Page 1 of 1

Batch Rename

Posted: Tue Mar 19, 2024 8:49 pm
by pb_raza
I'd like to use Batch Rename to name my file to have the year, month & date in the filename. When I try to use the date format variables it doesn't work. For example, when I try to use the four digit year by puttling 'Y' in the name template field, is just give me a "Y" when I'm looking to get 2017 from the EXIF data.

I must be missing something, please help!

Re: Batch Rename

Posted: Wed Mar 20, 2024 9:10 pm
by Franky
Try this {EXIF:Date Taken [Y-m-d]} what will give 2024-03-20

Re: Batch Rename

Posted: Fri Oct 18, 2024 1:16 am
by Phred
However, neither {Date Taken:[Y-m-d]} nor {Creation Date:[Y-m-d]} work.
They're taken as literals.

Like pb_raza, I'd like to use {Y-m-d} to pre-pend the write date, for instance, for images that don't have EXIF or IPC etc data.

I'm wondering what the purpose of the date format variables is.
Any possibilities?

Re: Batch Rename

Posted: Fri Oct 18, 2024 5:42 am
by user0
Phred wrote: Fri Oct 18, 2024 1:16 am However, neither {Date Taken:[Y-m-d]} nor {Creation Date:[Y-m-d]} work.
They're taken as literals.
reenter name template using ▶, you will see the difference

Re: Batch Rename

Posted: Fri Oct 18, 2024 6:17 am
by Phred
Yes, thanks user0, that's where I got the syntax from, and how I inferred what else might work.

The trouble, for me*, is that I'm after a date prefix on a filename in yyyy-mm-dd style, not a date & time one.

Anything further?

*and possibly many others after this becomes a discovery, if successful. 🤞

Re: Batch Rename

Posted: Fri Oct 18, 2024 6:25 am
by user0
1. ▶ > select desired date variable
2. ▶ > Date format variable > select desired format variable
(it will be auto inserted into your date variable)

Re: Batch Rename

Posted: Fri Oct 18, 2024 8:28 am
by Phred
Ahha! That did it nicely thanks user0.

I failed to take a step to the right:- those variables aren't just there for information. They're active controls.

I was able to prefix my filenames - from Browser view, Tools, Batch rename - with Y hyphen m hyphen d
yielding {Creation Date[Y-m-d]}

plus adding space underscore before the filename variable
yielding {Creation Date[Y-m-d]} _{Filename}
that I like.

#1 I see what you mean when you say "..▶ > select desired date variable" first, e.g. Accessed date or Modified date or Creation date from the Date format variables ▶ dropdown. That inserts the default long date & time. Then we must choose internal modifiers like Y m d h m or s.

#2 I note that those variables as active controls are very active: they don't like typed in {m}, for example, literals. That results in malformed {mY], say, that doesn't work. Just keep the field clean in the area in which you're inserting.
Indeed, a variable insertion appears to search for any braced ( { } ) expression to the left of the insertion point, placing any single variable within that braced expression. That can cause errors (sometimes invisible), but it's how the expressions are built up/modified.

#3 Further, you can type all the expressions and characters in, as long as you obey the internal rules of syntax.

SOLVED, imo. 🙏


PS This can all be done easily in Total Commander's Multi-rename Tool, but it's useful to have another device in the toolkit.
PPS That 'Clear templates' button clears the previous expressions you have created, the ones in the entry-field dropdown, nothing more, but you do lose them.