News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Rename photos by datetimeoriginal and calculate kids age

Started by aage, April 07, 2014, 03:43:04 PM

Previous topic - Next topic

aage

Hi Phil

Here is the output:
-------------------------
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/001_21_07_2013.JPG
Date/Time Original              : 2013:07:21 22:27:46
Make                            : Canon
My File Name                    : Canon_21072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/002_22_07_2013.JPG
Date/Time Original              : 2013:07:22 19:10:32
Make                            : Canon
My File Name                    : Canon_22072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/003_22_07_2013.JPG
Date/Time Original              : 2013:07:22 19:11:16
Make                            : Canon
My File Name                    : Canon_22072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/004_22_07_2013.JPG
Date/Time Original              : 2013:07:22 19:11:39
Make                            : Canon
My File Name                    : Canon_22072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/005_23_07_2013.JPG
Date/Time Original              : 2013:07:23 09:20:45
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/006_23_07_2013.JPG
Date/Time Original              : 2013:07:23 09:47:08
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/007_23_07_2013.JPG
Date/Time Original              : 2013:07:23 09:50:00
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/008_23_07_2013.JPG
Date/Time Original              : 2013:07:23 10:04:21
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/009_23_07_2013.JPG
Date/Time Original              : 2013:07:23 10:14:44
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/010_23_07_2013.JPG
Date/Time Original              : 2013:07:23 10:34:53
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/011_23_07_2013.JPG
Date/Time Original              : 2013:07:23 10:38:00
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/012_23_07_2013.JPG
Date/Time Original              : 2013:07:23 18:37:07
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/013_23_07_2013.JPG
Date/Time Original              : 2013:07:23 20:22:21
Make                            : Canon
My File Name                    : Canon_23072013_L5Y11M_J3Y2M
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1255.MOV
Make                            : Apple
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1981.JPG
Date/Time Original              : 2004:08:14 12:23:32
Make                            : Canon
My File Name                    : Canon_14082004
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1982.JPG
Date/Time Original              : 2004:08:14 12:24:43
Make                            : Canon
My File Name                    : Canon_14082004
======== /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1983.JPG
Date/Time Original              : 2004:08:14 12:24:59
Make                            : Canon
My File Name                    : Canon_14082004
    1 directories scanned
   17 image files read
-------------------------

Phil Harvey

Oops, you forgot the "$", and I didn't catch it.  Try this:

exiftool -config Aage.config -r "-filename<$myfilename.%e" /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage

My Terminalwindow:
-----------------------------
exiftool -config Aage.config -r "-filename<$myfilename.%e" /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/001_21_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/001_21_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/002_22_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/002_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/003_22_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/003_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/004_22_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/004_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/005_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/005_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/006_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/006_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/007_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/007_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/008_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/008_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/009_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/009_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/010_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/010_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/011_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/011_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/012_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/012_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/013_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/013_23_07_2013.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1255.MOV
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1981.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1982.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1983.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1256.MOV
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1978.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1979.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1980.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1251.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1253.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1254.JPG
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1257.MOV
    3 directories scanned
    0 image files updated
   25 image files unchanged

Phil Harvey

Now this one is my fault.  I forgot you are on a Mac.  On Mac you need to use single quotes around arguments with a '$':

exiftool -config Aage.config -r '-filename<$myfilename.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

Sorry about that.  It really shouldn't be this difficult to get things working.

I dont' know why you didn't see this message, which I get on my Mac if I do it wrong:

    myfilename: Undefined variable.

because the Terminal shell fails when it tries to interpret "$myfilename" as a shell variable within the double-quoted string.

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage

Thanks - i'll try it when my kids is a sleep - please sleep, kids ;-)

I'll get back ;-)

/Lars

aage

Hi Phil

Now things seems to be much better - thank you !

Here is my Terminal-window - still with some errors that causes some files not to be renamed. I think I have a guess - please see after Terminal-window-log:
-----------------------------------Aagesens-Mac-mini:~ Aagesen$ exiftool -config Aage.config -r '-filename<$myfilename.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/001_21_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/002_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/003_22_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_22072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/003_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/004_22_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_22072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/004_22_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/005_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/006_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/006_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/007_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/007_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/008_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/008_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/009_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/009_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/010_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/010_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/011_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/011_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/012_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/012_23_07_2013.JPG
Warning: [minor] Adjusted MakerNotes base by 4038 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/013_23_07_2013.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_23072013_L5Y11M_J3Y2M.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/013_23_07_2013.JPG
Warning: [minor] Tag 'myfilename' not defined - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1255.MOV
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1255.MOV
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_14082004.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1982.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Canon_14082004.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/IMG_1983.JPG
Warning: [minor] Tag 'myfilename' not defined - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1256.MOV
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1256.MOV
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/Canon_14082004.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1979.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/Canon_14082004.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe1/IMG_1980.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/Apple_27042012_L4Y9M_J2Y.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1253.JPG
Error: '/Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/Apple_27042012_L4Y9M_J2Y.JPG' already exists - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1254.JPG
Warning: [minor] Tag 'myfilename' not defined - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1257.MOV
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/IMG_1257.MOV
    3 directories scanned
    6 image files updated
    3 image files unchanged
   16 files weren't updated due to errors
-----------------------------------------------------------

My guess is that existing name of file (eksample: 003_22_07_2013.jpg -> 013_22_07_2013.jpg) are the same as far as ExifTool config-file is designed with parameters. Maybe the solution is to add HH.MM.SS to the config-file to distinguish files from the same day from each other. The the new filename should be in this format: Canon_22_07_2013_143025_L5Y11M_J3Y2M.jpg. This format will then "replace" my own existing format starting with leading zero - like 001, 002,003 etc.

What do you think and can you help me implement that in the config-file. (I have tried to figure it out myself - but must admit that I don´t have a clue ;-)

Is there another way ?

A few JPG´s are only renamed with mark and date but not the agecalculation and all MOV-files are not renamed. Could that be caused by missing the metadata so Exiftool can´t calculate ?

/Lars

Phil Harvey

Hi Lars,

Adding the time won't necessarily solve the problem (2 images can be taken in the same second).  So if the time isn't useful information I would suggest just adding a serial number, which you can do like this:

'-filename<$myfilename%-c.%e'

See the -w description in the application documentation for details about formatting the %c number to suit your tastes.

Try using CreateDate instead of DateTimeOriginal for the MOV files (this should also work for the JPG's).  Also, you should check to be sure they have Make information.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage

Hi Phil

You are rigth - again ;-)

I have now made a second config-file using the "CreateDate" and added a copynumber to the filename. My command line now looks like this:

exiftool -config Aage2.config -r '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe

...and it does exactly what I want to all my JPG´s and my MOV´s. I am so happy !!!!!!

A final quistion ;-)

I have some .MOD-files from a JVC videocamera and some .avi-files. These files are not renamed at all.

I have read posts in the forum about the "-ext avi" and then tried this using both DateTimeOriginal and CreateDate:
--------------------------------------------------------------------------------------
exiftool -config Aage.config -r -ext avi '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe
Warning: [minor] Tag 'myfilename' not defined - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/Blandet 028.avi
Warning: No writable tags set from /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/Undermappe2/Blandet 028.avi
    3 directories scanned
    0 image files updated
    1 image files unchanged
--------------------------------------------------------------------------------------

Still no success renaming these files and maybe this is caused (for the. MOD-files) by the fact that the documentation does not say anything about .MOD-files. It does however says that .MODD-files are supported - but I guess that this is some other file-format.

If ExifTool can´t solve this - actually I will just do it by hand - because using ExifTool on all other files in my directory have saved me a lot of time that I can spent on manually renaming these last files-types ;-)

/Lars

Phil Harvey

Again, these files must contain the Require'd tags from your config file for MyFileName to be generated.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage

Hi Phil

Thanks - I have been reading a bit and tried this - but with no luck.

Terminal-window: exiftool -a -u -g1 /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/002_20_07_2007.MOD
Result in this info:
-----------------------------------------------------------------------------
---- ExifTool ----
ExifTool Version Number         : 9.55
---- System ----
File Name                       : 002_20_07_2007.MOD
Directory                       : /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST
File Size                       : 85 MB
File Modification Date/Time     : 2007:07:20 19:57:50+02:00
File Access Date/Time           : 2014:04:14 18:53:35+02:00
File Inode Change Date/Time     : 2014:04:14 18:53:42+02:00
File Permissions                : rwxr-xr-x
---- File ----
File Type                       : MPEG
MIME Type                       : video/mpeg
---- MPEG ----
Image Width                     : 720
Image Height                    : 576
Aspect Ratio                    : 0.6735
Frame Rate                      : 25 fps
Video Bitrate                   : 8.4 Mbps
---- Composite ----
Duration                        : 0:01:24 (approx)
Image Size                      : 720x576
-----------------------------------------------------------------------------

Note that "File Modification Date/Time" is the date that MOD-file was created.

My idear was to copy this date into "CreateDate" which my config-file can process with the result of calculating the age of my kids and rename the file.

BUT running this in Terminal-window: exiftool "-filemodifydate<createdate" /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST gives me this result:
------------------------------------------------------------------------------
    1 directories scanned
    0 image files read
------------------------------------------------------------------------------

I have noticed that running this one : exiftool -a -u -g1 /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST trying to read out all metadata from DIR also result in the above "0 image files read".

What am I missing - and do you think I am on the right track here ?

/Lars

Phil Harvey

Hi Lars,

We could use FileModifyDate if the other date/time tags aren't available.  I could build this into the config file, but I don't have the time right now.  Give me until tomorrow morning and I'll come up with something for you.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage


Phil Harvey

Attached is a config file that will generate MyFileName for any source file.  It uses DateTimeOriginal, or CreateDate if DateTimeOriginal isn't available, or FileModifyDate if neither is available.  And it puts the Make at the start of the name only if it is available.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

aage

Hi Phil

Thanks - just tested the new config-file, which I have named Aage3.config. Unfortunately only still JPG´s are renamed.

In my directory "MOD_filer_TEST" I have the following files:
--------------------------------------------------------
002_20_07_2007.MOD
004_20_07_2007.MOD
Blandet_28.avi
Canon_06122012_L13Y9M_J8Y2M_0001.JPG
Canon_06122012_L13Y9M_J8Y2M_0002.JPG
Canon_26122011_L13Y9M_J8Y2M_0001.JPG
Canon_26122011_L13Y9M_J8Y2M_0002.JPG
Canon_26122011_L13Y9M_J8Y2M_0003.JPG
--------------------------------------------------------

As you can se only the JPG´s are renamed after running this :
exiftool -config Aage3.config -r '-filename<$myfilename%+.4nc.%e' /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST

The result is this:
-------------------------------------------------------------
Warning: [minor] Adjusted MakerNotes base by 4160 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/Canon_06012012_L13Y9M_J8Y2M_0001.JPG
Warning: [minor] Adjusted MakerNotes base by 4160 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/Canon_06012012_L13Y9M_J8Y2M_0002.JPG
Warning: [minor] Adjusted MakerNotes base by 4160 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/Canon_26122011_L13Y9M_J8Y2M_0001.JPG
Warning: [minor] Adjusted MakerNotes base by 4160 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/Canon_26122011_L13Y9M_J8Y2M_0002.JPG
Warning: [minor] Adjusted MakerNotes base by 4160 - /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST/Canon_26122011_L13Y9M_J8Y2M_0003.JPG
    1 directories scanned
    0 image files updated
    5 image files unchanged
-------------------------------------------------------------

I tried to change the extention of one MOD-file from MOD to MPEG - but still no renaming was done.

It looks like ExifTool dosen´t even know that the MOD´s and AVI´s are there.

What do think ?

And Phil, if this is getting to complicated and takes up all your spare time - please tell me ! Then I will do it by hand or accept that I have choosen the wrong Video Camera ;-) But a few more "rounds of trying" would save me manually renaming more than 3.000 MOD´s documenting the life of my two kids ;-)

Phil Harvey

Lars,

First, see FAQ 16 for why the AVI and MOD files weren't touched.

For the JPEG files, you need to give me more information.  What is the output from this command?:

exiftool -config Aage3.config -myfilename -make -datetimeoriginal -createdate -filemodifydate /Users/Aagesen/ExifTool_ExportFile/Oprindelig_Mappe/MOD_filer_TEST

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).