ExifTool Forum

ExifTool => Newbies => Topic started by: LionKing on September 26, 2016, 08:02:24 AM

Title: how to run the batch script for Mac terminal?
Post by: LionKing on September 26, 2016, 08:02:24 AM
Hi guys,

First of all i would like to say thank you Phil Harvey for making this awesome script. however I'm learning how to use this basic script as ExifTool and Mac terminal command.


i can't figure out how to compress the script into one command -I have to do one by one script at a time

Image filename is called Test.JPG

1: Exiftool -icc_profile -b -w icc test.jpg << this will extract ICC profile from the image

2: Exiftool -all= test.jpg << this will strip out all exif data from the image

3: Exiftool -Xresolution=300 -Yresolution=300 test.jpg << i had to put it back 300 dpi for printing purpose - somehow on step 2: that convert into 72DPI

4: check the image via "Preview" application - the image is very flat.

5: exiftool "-icc_profile<=test.icc" test.jpg << put it back ICC profile to get the same look as original image.

6: check the image via "Preview" application - the image is the same as original file.


above script is for only testing purpose, now I just can't figure out how to create the batch script for all images and i'm hoping you guy will show me the way to do it.


Regard
LionKing.
Title: Re: how to run the batch script for Mac terminal?
Post by: Phil Harvey on September 26, 2016, 08:55:43 AM
This command should do what you want:

exiftool -all= --icc_profile:all -xresolution=300 -yresolution=300 DIR

- Phil
Title: Re: how to run the batch script for Mac terminal?
Post by: LionKing on September 26, 2016, 09:54:54 AM
Hi Phil,

Thank you so much for one line command script - this is amazing !


However i've changed on top of your command...

exiftool -all= --icc_profile:all -xresolution=300 -yresolution=300 -r -overwrite_original Test << for all subdirectory

how can i add IPTC creator & copyright notice for all image? it is possible to add above command line?
Title: Re: how to run the batch script for Mac terminal?
Post by: Phil Harvey on September 26, 2016, 12:26:24 PM
Quote from: LionKing on September 26, 2016, 09:54:54 AM
how can i add IPTC creator & copyright notice for all image? it is possible to add above command line?

Of course.  You can write any additional tags that you want by adding more assignments on the command line, like this for example:

exiftool -all= --icc_profile:all -xresolution=300 -yresolution=300 -creator="Phil Harvey" -r -overwrite_original DIR

The only trick is figuring out what you want to write.  Take a look at FAQ 2 (https://exiftool.org/faq.html#Q2) for some help with this.

- Phil
Title: Re: how to run the batch script for Mac terminal?
Post by: LionKing on September 27, 2016, 05:20:20 PM
Thank you Phil,

I would like to learn more about CSV exporting & importing data from the images using above command, can you please point me out how to do that?

Title: Re: how to run the batch script for Mac terminal?
Post by: Phil Harvey on September 27, 2016, 05:55:47 PM
Sure.  Look at FAQ 12 and 26 (https://exiftool.org/faq.html#Q12)

- Phil