Help: Organize my collection based on meta data

Started by martenzi, October 11, 2014, 09:00:54 AM

Previous topic - Next topic

martenzi

I have a large collection. I would like to program the following:

1. Use EXIFtool to find / read meta data from all files in a folder (-r)
2. Create a Folder based on this meta data (YYYY City Model)
3. Copy or Move (Move when I can tell it´s working) files and Rename them (YYYY City Custom Name Model Sequence)

If this is to complicated then I would simply like to:1
1. Search files based on meta data (any tag)
2. Organise into folder with (YYYY Month any tag Custom Name) or just (YYYY Any tag)

You probably see where this is going. I have no need to print any information.

Is there a difference between meta data and "tag"? It could be that tag is the applied value the user defines. In this case I want to:
1. Find files based on meta data
2. Write Tag identical to meta data
3. Organise that into a folder based on the meta data or tag.

Any help with this would be amazing. I have spend several hours testing options but I´m quite good with screwing up the terminal commands and I find that the path system is my biggest enemy.

Forgive me for not showing how I started:

This worked beautifully.
exiftool -r -o."-Directory<DateTimeOriginal" -d "%Y%m%d" DIR

However, I thought I could add any Meta Data to the Directory name plus rename the files with date and that meta data. I sought to add this argument but failed somewhere:
exiftool '-filename<%f_${model;}.%e'


I looked at this advanced version but I don´t want to extract anything from my RAW files yet. I simply wish to take both jpeg and RAW files and sort them into folders based on date, city, custom name and model.
[Advanced]
Extract JpgFromRaw or PreviewImage from all but JPG files in DIR, saving them with file names like image_EXT.jpg, then add all meta information from the original files to the extracted images:
exiftool -if '$jpgfromraw' -b -jpgfromraw -w %d%f_%ue.jpg
-execute -if '$previewimage' -b -previewimage -w %d%f_%ue.jpg
-execute -tagsfromfile @ -srcfile %d%f_%ue.jpg -overwrite_original
-common_args --ext jpg DIR

Phil Harvey

Quote from: martenzi on October 11, 2014, 09:00:54 AM
I have a large collection. I would like to program the following:

1. Use EXIFtool to find / read meta data from all files in a folder (-r)
2. Create a Folder based on this meta data (YYYY City Model)
3. Copy or Move (Move when I can tell it´s working) files and Rename them (YYYY City Custom Name Model Sequence)

The command could look like this:

exiftool -o dummy/ "-filename<YYYY $city ${model;}/YYYY $city Custom Name ${model;} %c.%e" DIR

where DIR is the source directory.  With -o dummy/ the files are copied.  Without this they are moved.  See this page for more information.  (The above quoting is for Windows.  Mac/Linux use single quotes instead.)

QuoteIs there a difference between meta data and "tag"?

A "Tag" is the name that ExifTool gives to a piece of metadata.  (eg. "Author" or "DateTimeOriginal")

QuoteI sought to add this argument but failed somewhere:
exiftool '-filename<%f_${model;}.%e'

What system are you running?  The single quotes above are for Mac/Linux.  On Windows you need double quotes.

- 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 ($).

martenzi

I guess I´m not fully understanding the concepts of meta data and tags. I humbly wish for a clarification. The meta data is embedded in file or a file contained within that folder. Are tags a universal concept, a OS X concept, or different between softwares (Adobe Bridge, Spotlight, EXIFtool etc.)?
I had the idea that sorting all my photos (10 000+) by date, city and event. Then tag them with the same plus additional tags to ease my personal search. Will such tags used by OS X be the same as with Bridge and created with EXIFtools?

Quote
The command could look like this:

exiftool -o dummy/ "-filename<YYYY $city ${model;}/YYYY $city Custom Name ${model;} %c.%e" DIR

where DIR is the source directory.  With -o dummy/ the files are copied.  Without this they are moved.  See this page for more information.  (The above quoting is for Windows.  Mac/Linux use single quotes instead.)
The code seemed to work and resulted in:

Quote
Warning: [minor] Tag 'city' not defined - /Users/henrikmartenzon/Pictures/EXIF_Testing/Whatsapp/2014Oct Edinburgh (109).JPG
Warning: No writable tags set from /Users/henrikmartenzon/Pictures/EXIF_Testing/Whatsapp/2014Oct Edinburgh (109).JPG
   14 directories scanned
    3 directories created
    0 image files updated
   60 image files copied
    2 files weren't updated due to errors

1. Based on the warnings I assume there is another step I have missed. Do I need to create a set of tags based on the meta data I wish to use?
2. Since these are new photos taken with the iPhone 6 (most of them) I presumed they would have all kinds of modern info (meta data) embedded in them (GPS etc.). Is that a wrong assumption?

Cheers

Phil Harvey

Quote from: martenzi on October 12, 2014, 07:53:15 AM
Will such tags used by OS X be the same as with Bridge and created with EXIFtools?

Reading FAQ 2 and 3 may help explain things.

Quote1. Based on the warnings I assume there is another step I have missed. Do I need to create a set of tags based on the meta data I wish to use?

I'm really not clear on exactly what you want to do.  My example relies on the City tag already existing in the image because its value is used in the new file name.

Quote2. Since these are new photos taken with the iPhone 6 (most of them) I presumed they would have all kinds of modern info (meta data) embedded in them (GPS etc.). Is that a wrong assumption?

Run exiftool on them to find out.

- 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 ($).