Hello,
I was wondering if there is a way to take the existing keywords of a (JPG) file and randomize their order.
I wish the keyword order is no longer alphabetical but random.
Would this be possible with exiftool?
Thanks!
Sure. This could more easily be done with a user-defined Composite tag, but as a one-liner:
exiftool "-keywords<${keywords;my @a=split m(//);my @b;push @b, splice(@a,int(rand(@a)),1) while @a;$_=\@b}" -sep // FILE
Use Subject instead of Keywords if you are using XMP keywords instead of IPTC/NAA.
- Phil
Hi Phil,
Thanks so much for your time!
I tried the script in various ways but I get a 'bad substitution' return. Does it work on your end?
P.S. I have already successfully run exiftool "-Title>Description", but that is a much simpler code!
It worked for me. Are you on Windows? If not, you must change to single quotes.
- Phil
It works with the single quotes! I'm on mac indeed. So happy. Thanks for all the work you put into this software, it really helps to organise my files.