News:

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

Main Menu

Delete Originals

Started by rwells1938, November 11, 2013, 02:53:57 PM

Previous topic - Next topic

rwells1938

I am unable to get this script to work. What I am trying to do is to delete all originals in the VTestPhoto folder.

exiftool -delete_original -r '/Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/'

Thanks for any help
Roger

Phil Harvey

Hi Roger,

For this to work, the corresponding edited images must still exist beside the "_original" files.  Is this the case?

Also, what is the output of the command?  Just saying "it doesn't work" doesn't give me much to go on.

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

rwells1938

Yes

======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/001_IMG_2671.CR2
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/002_v001_001.TIF
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/003_V073_001.JPG
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/004_V095_001.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/005_V095_004.JPG
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/1 - Rakes, Benjamin Family Photo Page.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Bass, Bertha Beard Bass & Dorothy Louise.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Beard, Bertha, Grace & Velma.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Beard, Martha Lou and granddau.NellieFarmer (from JimPaul).jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Beard, Martha Lou Raikes - dau. of Monroe.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Beard, Martha Lou Raikes Beard  and Family.jpg
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/CSVIN.numbers
======== /Volumes/Macintosh HD 2/WellsImages/WellsImages/VTestPhoto/Picture.jpg
    1 directories scanned
   13 image files read

Phil Harvey

I don't see why it shouldn't work.  Here is how it works for me:

> ls tmp
a.jpg a.jpg_original

> exiftool -delete_original tmp
    1 directories scanned
    1 image files found
    1 originals will be deleted!  Are you sure [y/n]? y
    1 original files deleted

> exiftool -ver
9.40


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

Phil Harvey

Ah.  If that is the output from your command, then you are running an old version of ExifTool from before the -delete_original option was added (version 8.40 -- 3 years ago).  Either that, or you spelled -delete_original wrong (did you add an "s" perhaps?).

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

rwells1938

OK I took out the -r and now I get the the message like you do.

I am running in an apple script and now can't figure out how to answer the message. The only option seems to be cancel or ok no place to enter the y to delete?

Roger

Phil Harvey

Hi Roger,

It should work with or without -r.  However, it probably won't work from within a script because it prompts for confirmation.  Use -delete_original! (with an exclamation) to avoid the prompt.

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

rwells1938

Thanks the ! will worked fine. Once the script is working I don't plan to update in place.

Roger