Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request File: Name #546

Open
Philshappy opened this issue Sep 2, 2024 · 24 comments
Open

Feature request File: Name #546

Philshappy opened this issue Sep 2, 2024 · 24 comments
Assignees

Comments

@Philshappy
Copy link

Philshappy commented Sep 2, 2024

Would it be possible to add an option (check box or something) to flip the date with New File Name Starts With and the Change Filename so the renamed filename looks like 'Car 20240606' instead of '20240606 Car'. I prefer the name first to group or sort by item instead of dates. Also, it appears you cannot select multiple files to be renamed if they have the same dates so would it be possible to add a number in parenthesis starting with a number that is input by the user at the end of the filename.

@Philshappy Philshappy changed the title Feature Rename Filena: Name Feature request File: Name Sep 2, 2024
@FrankBijnen FrankBijnen self-assigned this Sep 3, 2024
@FrankBijnen
Copy link
Owner

@Philshappy

Hi Phil,

Will look into it. Give me some time

Frank

@FrankBijnen
Copy link
Owner

Would it be possible to add an option (check box or something) to flip the date with New File Name Starts With and the Change Filename so the renamed filename looks like 'Car 20240606' instead of '20240606 Car'. I prefer the name first to group or sort by item instead of dates.

Yes that's possible. Will think of something

Also, it appears you cannot select multiple files to be renamed if they have the same dates so would it be possible to add a number in parenthesis starting with a number that is input by the user at the end of the filename.

I think you mean that the files will not be unique after renaming. Exiftool has something called %c that could be used, but I can not find that one can input a nr.

(Look for %c in https://exiftool.org/exiftool_pod.html)

To be continued,
Frank

@FrankBijnen
Copy link
Owner

Update: I found out how to set a start value, but ExifTool itself seems to have a problem with that.

I'm adding the ExifTool command to use here for future reference.

exiftool -v0 -overwrite_original "-filename<${Exif:DateTimeOriginal} RenameTest (%%3.4C).%%e" -d %%Y-%%m-%%d File1.jpg

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@FrankBijnen
Copy link
Owner

Indeed the %c %C is was looking at. Unfortunately the %C (Uppercase) seems to have a problem. (Exiftool will hang sometimes) Need to talk to Phil (Harvey) about that.

Another thought. If I were to use this function for myself I would probably prefer a subdirectory for the 'Cars'.

cars\2024-09-01
cars\2024-09-04

etc. What do you think?

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@FrankBijnen
Copy link
Owner

OK. I understand now. Thanks.

Will let you know when I have something ready.

@FrankBijnen
Copy link
Owner

Problem reported to ExifTool:
https://exiftool.org/forum/index.php?topic=16432.0

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@FrankBijnen
Copy link
Owner

Sometimes I am....

Come to think of it. That specific ExifTool command is only needed when you want to be able to specify the starting sequence number. If you let ExifTool decide (%C vs %c) then it would work.
Do you rellay need to specify the starting nbr yourself?

Frank

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@FrankBijnen
Copy link
Owner

If you use the command on 3 of then I assume Exiftool will add the suffix -1,-2,-3 or something like this. Now you want to add the 3 remaining. If Exiftool recognizes that -1,-2,and -3 are used and if it then starts with -4 and continues with -5,-6

That is what will happen. But...
Suppose you deleted file -2 before you start renaming the last 3, then the last 3 would be named:
-2, -4 ,-5
In other words: It will fill the gaps.

Another thing: the first file we be named without -1 So in your example:
Cars 20240901.jpg
Cars 20240901-1.jpg
Cars 20240901-2.jpg

second rename
Cars 20240901-3.jpg
Cars 20240901-4.jpg
Cars 20240901-5.jpg

I suggest I start with that option that works (%c), and when Phil Harvey comes with an answer I will look into the other option (%C)

Frank

@Philshappy
Copy link
Author

Philshappy commented Sep 4, 2024 via email

@FrankBijnen
Copy link
Owner

Hi Phil,

Made some changes, that you could test.
Modify_rename

  • I have added a CheckBox -DateTime first
  • And A checkbox -Unique filenames (%-c)

The preview should give you an idea. The pre-rel (636) is uploaded to me OneDrive, and also has DateTime shifting updates. See the other issue.
C:\user\ExifToolGUI\Redist\Prerel\ExifToolGui_PreRel_636.zip

Frank

@Philshappy
Copy link
Author

Frank,

The rename changes adds a lot of flexibility to changing the file names. Thanks.
      1) When I tried the Remove leading Date/Time it appears to remove whatever is leading so if I renamed the file to 'Car 20240101' instead of removing the date/time it removes the car.
      2) When file names result like 24-01-01-1 is it possible to put a space after the date/time so 24-01-01 -1 or some other delimiter to separate the name from the unique counter.

Comments on the Exif Time Shift
      1) Consider changing the name from Exif DateTime shift to something more descriptive of the full capability as you added file name changes. Maybe 'Date/Time Change'.
      2) The Shift amount and Date Time result to not always track. For example, I edit the date result directly in the text box with 2024:02:02 and the result display the previous date and the following 0078:06:22 00:00:00 shift amount. When I check the increment or decrement the result is a really wrong date. Similar behavior occurs if I use the down arrow and scroll thru the calendar to select a new date.

Phil

@Philshappy Philshappy reopened this Sep 6, 2024
@Philshappy
Copy link
Author

Accidently closed it.

@FrankBijnen
Copy link
Owner

Thanks for your feedback Phil, really appreciate it.

<      1) When I tried the Remove leading Date/Time it appears to remove whatever is leading so if I renamed the file to 'Car 20240101' instead of removing the date/time it removes the car.
The 2 functions are unrelated. When you click on the bottom button, it only removes the part up, and including, the first space found. That's it

Eg. "abcde 12345.jpg" => "12345.jpg"
"12345 abcdef.jpg" => "abcdef.jpg"

      2) When file names result like 24-01-01-1 is it possible to put a space after the date/time so 24-01-01 -1 or some other delimiter to separate the name from the unique counter.

Will look into it. (maybe 24-01-01 (1).jpg ?)

      1) Consider changing the name from Exif DateTime shift to something more descriptive of the full capability as you added file name changes. Maybe 'Date/Time Change'.

It still is only shifting. When you have 3 files selected with different dates, the outcome will still be 3 different dates.
2010-01-01 12:00:00
2010-01-02 12:00:00
2010-01-03 12:00:00

When you select the date 2010-02-01 13:00:00 it computes a difference of 1 month and 1 hour 0000:01:00 01:00:00
2010-02-01 13:00:00
2010-02-02 13:00:00
2010-02-03 13:00:00

The intended use was when you have a lot images taken with the camera set to a wrong date/time.
Maybe a new function would be better to avoid confusion. One that sets all selected files to the same date.

      2) The Shift amount and Date Time result to not always track. For example, I edit the date result directly in the text box with 2024:02:02 and the result display the previous date and the following 0078:06:22 00:00:00 shift amount. When I check the increment or decrement the result is a really wrong date. Similar behavior occurs if I use the down arrow and scroll thru the calendar to select a new date.

Thanks for this. I found 2 problems this morning. Will do some more testing. If I think it's OK, I will inform you.

Frank

@FrankBijnen
Copy link
Owner

Hi Phil,

As promised. I updated the pre-rel. Think it behaves a lot better when you change the date directly. Also I added the date created to the filelist. Makes testing a lot easier.

A few remarks:

  • When you move back in time < 1980-01-01 the dates may not show in the filelist.
  • When you move even further back < 1600-01-01 the date can not be shown in the calendar.
  • And even further back < (around) 1550-01-01 ExifTool will refuse that

Frank
P.S. Only have a look when you have the time....

@Philshappy
Copy link
Author

Philshappy commented Sep 7, 2024 via email

@FrankBijnen
Copy link
Owner

Hi Phil,

For some reason I cannot check the decrement. I can check the increment. When it show no check for the decrement it still decrements.

When you enter the "shift Amount" you should check "Increment" if you want to move ahead in time. If you want to move back in time, uncheck it. The text will display "decrement" in stead of "Increment". That's how it also worked in previous versions.
When you enter a 'Datetime result" GUI will determine the checkbox for you. If the date is before the current, it will uncheck it, else it will check it.
Does this explanation make sense?

Consider the default check box to be empty instead of several being checked. Too many times I found myself changing something cause the box was checked by default.

Which default check box?
The checkboxes "Original" and "Create"and "change File Create" are checked if GUI finds a valid date time in the file
The checkboxes "Modify" and "change File Modify" are checked if you have enabled "Preserve date modified" in Options

If you change nothing and you just press Enter, the date times in the metadata are untouched, and the dates in Explorer reflect the dates in the metadata.

The issue I ran into was I wanted the Modify Date and Create Date to be different than the Date Time Original but the shift amount is always computed from the DateTime original.

Indeed very difficult for me at this time of day after a few beers.
Can you give an example? (Screenshots before/after)

I'm thinking of changing the 'Datetime equalize' so that you can specify all dates. And all selected files will get those dates. Maybe that will solve it?

Frank

(It's 1 after midnight here. I'm going to bed)

@Philshappy
Copy link
Author

Philshappy commented Sep 8, 2024 via email

@FrankBijnen
Copy link
Owner

Hi Phil,

Again an pre-rel update. For the rename I have adjusted the layout a little. The Preview has improved, It shows the filename you type in now.
rename1

See the other issue (545) for what has changed to the date time shifting.

Frank

@FrankBijnen
Copy link
Owner

Hi Phil,

Phil Harvey has fixed the bug I found when using the rename with %2.4C in ExifTool 12.97.
https://exiftool.org/forum/index.php?topic=16432.0

When I have the time I will update the rename function accordingly, So you can specify the starting sequence number.
Will keep you posted.

Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants