How to run a single line ExifTool script on the current directory?
For testing, I tried to display:
exiftool -if $DateTimeOriginal -DateTimeOriginal *.*
My actual command is: [to create the date from a filename ex. IMG-20190509-WA0009.jpg (but breaks over WA0060) ]
exiftool -P -overwrite_original "-datetimeoriginal<filename" *.*
They work in the address line by prefixing with ! but I would prefer a script assigned to a keypress as I will create more than one script.
I tried run "exiftool.exe ...." but no matter where I try adding quotation marks in singles, pairs or triplets there is always a "Dubious Syntax" error.
Adding the path to exiftool.exe didn't help.
Do I need to call the command/terminal window first? (I tried following another example but that failed as well.)
Can use the <curpath>? ex. exiftool -P -overwrite_original "-datetimeoriginal<filename" <curpath>
How to run ExifTool script on the current directory?
Re: How to run ExifTool script on the current directory?
You can't execute commands directly in a script.
You need to use e.g.
Like:
You need to use e.g.
run
or runret()
Like:
Code: Select all
$result = runret("""exiftool"" -P -overwrite_original ""-datetimeoriginal<filename"" *.*");
text $result;
One of my scripts helped you out? Please donate via Paypal
Re: How to run ExifTool script on the current directory?
That works. Thank you for the prompt reply!
My notes:
Works but the cmd window opens and automatically closes when done:
The results open in a persistent window:
My notes:
Works but the cmd window opens and automatically closes when done:
Code: Select all
run """exiftool"" -time:all -g1 -a -s *.mp4"
Code: Select all
$result = runret("""exiftool"" -time:all -g1 -a -s *.mp4");
text $result;