Author Topic: Delete Originals  (Read 3786 times)

rwells1938

  • Jr. Member
  • **
  • Posts: 16
Delete Originals
« on: November 11, 2013, 02:53:57 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Delete Originals
« Reply #1 on: November 11, 2013, 03:07:33 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rwells1938

  • Jr. Member
  • **
  • Posts: 16
Re: Delete Originals
« Reply #2 on: November 11, 2013, 03:09:02 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Delete Originals
« Reply #3 on: November 11, 2013, 03:12:07 PM »
I don't see why it shouldn't work.  Here is how it works for me:

Code: [Select]
> 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Delete Originals
« Reply #4 on: November 11, 2013, 03:16:56 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rwells1938

  • Jr. Member
  • **
  • Posts: 16
Re: Delete Originals
« Reply #5 on: November 11, 2013, 03:22:03 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Delete Originals
« Reply #6 on: November 11, 2013, 03:24:41 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

rwells1938

  • Jr. Member
  • **
  • Posts: 16
Re: Delete Originals
« Reply #7 on: November 11, 2013, 03:34:24 PM »
Thanks the ! will worked fine. Once the script is working I don't plan to update in place.

Roger