Multi-Renaming - Problem with getting the date

Discussion related to "Everything" 1.5 Alpha.
Post Reply
mike_bjb5wtkuwg
Posts: 8
Joined: Wed Jun 29, 2022 2:21 pm

Multi-Renaming - Problem with getting the date

Post by mike_bjb5wtkuwg »

Hello,

This is probably obvious to everyone else but me.

Here it goes, let's assume I have many files and their file name follows this pattern: IMG_1234.jpg, when I view the Windows properties for that file, I can see that it has a date modified set to "28 ‎December ‎2021, ‏‎12:14:46".

Now, I want that date to be added to the file name.

I go to the Advanced Rename feature and type in the "New Format" input: $date-modified:-IMG_%1.jpg

I hoped to see the date added to the file name, but what I get is this file name: 132851636860000000-IMG_%1.jpg

I have no idea, how to interpret what is that monstrosity shown above in bold.

My question is this, how can I structure the syntax of the new format, to match this pattern: yymmddhhmmss-IMG_%1.jpg

So that my end result would be: 211228121446-IMG_1234.jpg and so on, for all other files.

Thank you kindly.

Edit
I am using: 1.5.0.1326a (x64) build.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Multi-Renaming - Problem with getting the date

Post by raccoon »

Sorry. The $date-modified: variable is a Windows FILETIME expressed in the number of 100 nanosecond intervals since 01-Jan-1601. If you want to reformat it to something more human-readable, then you'll use the #format-filetime:<filetime,[format]> function.

viewtopic.php?f=12&t=10099#format-filetime

The accepted format parameters are explained in the two links below.

https://www.voidtools.com/support/every ... ate_format

https://www.voidtools.com/support/every ... ime_format
mike_bjb5wtkuwg
Posts: 8
Joined: Wed Jun 29, 2022 2:21 pm

Re: Multi-Renaming - Problem with getting the date

Post by mike_bjb5wtkuwg »

... Yeah, I looked at all the links you provided, but it's way beyond me. I think it's directed at people who actually code or have a high degree of familiarity with coding paradigms. I'm just a guy who wants to have his photo library properly organized ;-)

Thank you though, for trying to help.

If you have the time and will to type a bit more dumbed-down instructions on how to use the information from your links, I would be very happy.
I need to know what I should put in the "New Format" input field to get the yyyymmddhhmmss-IMG_%1.jpg template working.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Multi-Renaming - Problem with getting the date

Post by void »

Everything uses FILETIMEs because a date: (eg: 28 ‎December ‎2021, ‏‎12:14:46) is not a valid filename.

The date/FILETIME requires formatting:

Please try the following:
Uncheck regular expressions.
Set the old format to: %1
Set the new format to: <formatfiletime:$dm:,yyyyMMddHHmmss>-%1

text inside <> uses the Everything search preprocessor.
$dm: = date modified time stamp as a FILETIME.
yyyyMMddHHmmss is the desired date/time format.



I will consider adding some predefined macros to make this easier.
Thank you for the suggestion.
Last edited by void on Tue Nov 08, 2022 11:21 pm, edited 2 times in total.
Reason: fixed date format
mike_bjb5wtkuwg
Posts: 8
Joined: Wed Jun 29, 2022 2:21 pm

Re: Multi-Renaming - Problem with getting the date

Post by mike_bjb5wtkuwg »

Thank you, thank you, thank you. That is exactly what I was looking for. This solves my problem.

On that note Mr. Void, where on the forum would be the best place to leave comments about usability enhancements I thought of while working with your software?

I know you've heard it many times, but Everything is by far the best piece of software I have on my Windows PC.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Multi-Renaming - Problem with getting the date

Post by void »

In the Everything 1.5 forum.

Thank you for your feedback.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Multi-Renaming - Problem with getting the date

Post by raccoon »

void wrote: Tue Nov 08, 2022 9:35 pm...
Set the new format to: <formatfiletime:$dm:,yyyymmddhhmmss>-%1
The month must be expressed with capital MM otherwise it will give you minutes mm.
Also, if you are not specifying AM/PM then you probably want 24H time, which is capital HH. Otherwise your evening photos will not sort correctly against your morning photos from the same day.

<formatfiletime:$dm:,yyyyMMddHHmmss>-%1
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Multi-Renaming - Problem with getting the date

Post by void »

Good catch, updated my format.
Post Reply