Photography - Exif Tag Scrubbing Folder Action
by: George Starcher, Associate Editor
I promised in the earlier blog post “Photography - Exif Tags” that I would look at how to make an automated folder action to scrub the exif information from any images dropped into the desired folder.
Here is how you do it:
*** WARNING ***
To avoid a loop this uses the overwrite option of exiftool. DO NOT drag in your only copy of original images.
I also would not drag a large number of images into the folder at once. Also empty the folder once it’s done. AppleScript folder actions are not very quick. It could cause a long run time if you drag in too many photos. This is mainly for quick and easy scrubbing of small groups of images.
- Download and install ExifTool by Phil Harvey.
- Create the desired scrubbing folder somewhere on your system.
- Open up Automator.
- Drag the desired folder straight into the Automator window. It will add a “Get Specified Finder Items” object for your folder.
- Drag over the Finder action “Get Folder Contents”
- Add the Run Shell Script action. Set Pass Input to “as arguments” then paste the below code into the script area. This differs slightly from my previous blog post only in that I added the overwrite original option and quotes around the $name variable on the exiftool line. This gives it the ability to handle spaces in the file names as well as prevents a looping issue caused if you allow it to make a renamed original copy.
for f in “$@”
do
cd `dirname “$f”`
name=`basename “$f”`
exiftool -All= -overwrite_original “$name”
done - Once you have the automator looking similar to the above, click file, choose Save As Plug In. Name it something like “ScrubExif” choose Plug-in For: Folder Actions lastly browse to the folder you specified in the automator. Click save.
You’re done. Drag some images into the folder. Wait a minute and it should scrub the files automatically.
Alternate Solution: Automator as Application.
If you prefer, just change out the “Get Specified Finder Items” with “Ask for Finder Items” Be sure to check “Allow Multiple Selections” and change Type to “Files and Folders” Click File -> Save As and save it as an application. Then you have a nice double click application that will simply ask you for a folder of images and scrub them in place. If you want to do it this way you could remove the -overwrite_original option from the script for backup of your original images.














Add New Comment
Viewing 3 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment