ExifTool Forum

ExifTool => Newbies => Topic started by: horvjan on November 27, 2016, 02:43:01 PM

Title: Deleting excess "spaces" around hierarchical separator
Post by: horvjan on November 27, 2016, 02:43:01 PM
Hello,

Let me ask your help as a ExifTool Newbie. I started to use ExifTool through FastPhotoTagger app. I used this app to add IPTC keywords to my images. I gave several keywords to each picture separeted by ";". But I made a mistake when I thought I should put space around (before AND after) the separator. (Ok, you are right it was stupid, but pls be gentle, as mentioned before I am a Newbie... still learning)

Is there a way to mass delete these obsolete spaces around the separator? There are a lots of folders (Folder name = Original date of the image; image name= Original date (YYYYMMDD) and original time (hhmmss) something like this 20161126_203923.jpg.

Thanks in advance.

horvjan
Title: Re: Deleting excess "spaces" around hierarchical separator
Post by: Phil Harvey on November 27, 2016, 04:52:33 PM
Yes, try this:

exiftool -sep ";" "-keywords<${keywords;s/\s*;\s*/;/g}" DIR

- Phil
Title: Re: Deleting excess "spaces" around hierarchical separator
Post by: horvjan on November 28, 2016, 02:27:29 PM
Thank you Phil, it works fine on one directory.
How could I use this to work on every subfolder as well?
Title: Re: Deleting excess "spaces" around hierarchical separator
Post by: StarGeek on November 28, 2016, 02:51:42 PM
Add -r to your command.