FrankBijnen / ExifToolGui

A GUI for ExifTool
GNU General Public License v3.0
315 stars 15 forks source link

Feature request File: Name #546

Open Philshappy opened 1 week ago

Philshappy commented 1 week ago

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.

FrankBijnen commented 1 week ago

@Philshappy

Hi Phil,

Will look into it. Give me some time

Frank

FrankBijnen commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

Thanks Frank.

When I tried to select multiple images and rename them it was unsuccessful because as you said the file names would not be unique. I think the %c would be OK, creating multiple file names that are not unique. Say we have 6 images of my cars taken the same day and I want to rename them using only the date no time. Select 3 of them and rename them each with the same dates incorporated. Then try the other 3. Would exiftool create file names for example '20240303 Car' 20240303 Car -1' and '20240303 Car -2' then what would it do when you tried to rename the remaining 3. Would it create '20240303 Car -3' and so on.

Phil


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 2:36 AM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2328382531, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUV3QXRWZXFDEHBR6CTZU3ICHAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRYGM4DENJTGE. You are receiving this because you were mentioned.Message ID: @.***>

Philshappy commented 1 week ago

Great! Hopefully ExifTool can be updated.

Phil


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 5:33 AM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2328866783, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUTERI4MXL5JWR2IGNDZU342NAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRYHA3DMNZYGM. You are receiving this because you were mentioned.Message ID: @.***>

FrankBijnen commented 1 week ago

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 commented 1 week ago

The subdirectory for each individual function sometimes becomes overwhelming. For example, if I took 20 photos at a car show on 2024-03-03 i would have a lot of subdirectories. In the example below there are 3 images of the same car and that's were the multiple filenames would be useful. Hopefully ExifTool will be fixed soon so your approach with inserted numbers would be a perfect solution.

Mustang 2024-03-03 Mustang 2024-03-03 -1 Mustang 2024-03-03 -2 Explorer 2024-03-03 Ferrari 2024-03-03 Honda 2024-03-03 And so on.


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 8:17 AM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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?

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2329351840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPURYNCHFUHOQBB6ND2LZU4QCBAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGM2TCOBUGA. You are receiving this because you were mentioned.

FrankBijnen commented 1 week ago

OK. I understand now. Thanks.

Will let you know when I have something ready.

FrankBijnen commented 1 week ago

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

Philshappy commented 1 week ago

Wow that was fast!

Phil


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 10:34 AM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2329628293, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUTNUVETH5IPPKRMGADZU5ACNAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGYZDQMRZGM. You are receiving this because you were mentioned.Message ID: @.***>

FrankBijnen commented 1 week ago

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 commented 1 week ago

So it depends on the Exiftool implementation. I noted the situation when you have let's say 6 files. 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 then I would say you don't need to specify a starting number. I think it would be nice to have the flexibility to specify the starting number but not required.

Phil


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 10:46 AM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2329648277, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUQGSBL5BCIQP2DYX5DZU5BPZAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGY2DQMRXG4. You are receiving this because you were mentioned.Message ID: @.***>

FrankBijnen commented 1 week ago

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 commented 1 week ago

Great! I think it will be a great addition to the rename capability.

Thanks!

Phil


From: FrankBijnen @.> Sent: Wednesday, September 4, 2024 12:43 PM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; Mention @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2329839897, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUUZX5EPH5VGFLK6PELZU5PHBAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZHAZTSOBZG4. You are receiving this because you were mentioned.Message ID: @.***>

FrankBijnen commented 1 week ago

Hi Phil,

Made some changes, that you could test. Modify_rename

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 commented 1 week ago

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 commented 1 week ago

Accidently closed it.

FrankBijnen commented 1 week ago

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 commented 1 week ago

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:

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

Philshappy commented 1 week ago

Frank,

The enter text box for date/time is much better. A couple of comments.

1. For some reason I cannot check the decrement. I can check the increment. When it show no check for the decrement it still decrements. 2. 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. 3. 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. In my particular case the DateTime original, Created Date, and Modified date all were different. How does this happen, well I used a photo editor, which preserves the DateTimeOriginal but modifies the created and modified dates depending on the date you first create the edited photo and then the subsequent dates change the modify. Wow, complex. Its is workable if the Date Created and Date Modified are the same but when they are not the shift time is an issue because it applies the same shift. Consider adding another check box that is shift or absolute and then the calendar can still shift from the Original Date Time but can be applied as either a shift or a value.

Phil


From: FrankBijnen @.> Sent: Saturday, September 7, 2024 1:00 PM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; State change @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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:

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

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2336425118, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUQXJRCQXKKT3JQXJN3ZVNLN7AVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGQZDKMJRHA. You are receiving this because you modified the open/close state.Message ID: @.***>

FrankBijnen commented 1 week ago

Hi Phil,

1. 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?

2. 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.

3. 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 commented 1 week ago

1. Yes I understood how the check boxes worked but thought it was an error when the decrement doesn't show a check. Now that you pointed it out I understand.

   2) I was thinking that maximum flexibility was achieved when no check boxes are automatically checked and the user decides which boxes should be checked. For example, the user might want to update the file create date but not the original date, I can see your point as well so its OK. 3) The issue I ran into was I wanted the Modify Date to be different than the Date Time Original and CreateDate but the shift amount is always computed from the DateTime original. Lets say the Original date and Create Date, are set to 2024-01-01 and the modified date is 2024-01-03. I want the original date and create date to remain 2024-01-01 and the modify date to be 2024-01-05 but when I use the calendar to select the 2024-01-05 it computes the shift from the original date, that would be +4 days but the modified date needs to be +2 days. Its easy if there is only a couple of days but much harder if its a big difference between them.

Have a good night and get plenty of rest.

Phil


From: FrankBijnen @.> Sent: Saturday, September 7, 2024 4:00 PM To: FrankBijnen/ExifToolGui @.> Cc: Philshappy @.>; State change @.> Subject: Re: [FrankBijnen/ExifToolGui] Feature request File: Name (Issue #546)

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)

— Reply to this email directly, view it on GitHubhttps://github.com/FrankBijnen/ExifToolGui/issues/546#issuecomment-2336474756, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDSLPUV2GSZPO7VJY5CV2U3ZVOASPAVCNFSM6AAAAABNQ2GNWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGQ3TINZVGY. You are receiving this because you modified the open/close state.

FrankBijnen commented 1 week ago

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