Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
2

Running EXIFTool from Bridge with app.system()

LEGEND ,
Feb 21, 2023 Feb 21, 2023

:EDIT: Got it working, the entire executable path is required.

 

 

Since I discovered that Bridge can't perform a bunch of operations on XMP/EXIF data, I have been working on hooking up EXIFTool to Bridge. I have been going round and round and CANNOT get EXIFTool to run using app.system().

 

I do use this function in other scripts, and I'm able to call other executables (I've used it with Adobe DNG Converter, cURL, and have been able to run simple things like dir/ls and redirect the output to a file.

 

If I call the command, it just silently fails. Bridge doesn't have a way for commands to send an error message back so I'm just in the dark. Writing the command to an alert window, copying it, then running THAT in a command window works on both platforms.

 

This is a very simple command that fails (on the Mac, its installed in the command path so just calling "exiftool" works in Terminal.)

 

    var cmd = "C:/Users/converse/Downloads/exiftool.exe -a -ALL -G1 -s C:/Users/converse/Desktop/04068.jpg > C:/Users/converse/Desktop/log.txt";
    app.system(cmd);

 

Adding single or double quote marks to the filename is no help. Copying that and running it on the command line works on both platforms. Replacing the exiftool call with "dir" or "ls -la" will write correctly to the log file. Same result with processing files, can't call a working command with app.system().

 

I'm wondering if anyone has gotten this working and how? It seems like it SHOULD work ok.

TOPICS
How to , Scripting
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 28, 2023 Feb 28, 2023

And new versions- fixed a couple of bugs that Greg pointed out, no longer looping exiftool when processing multiple files, other minor improvements.

 

/*
Utility Pack Scripts created by David M. Converse ©2018-23

This script displays an EXIFTool info panel in the Bridge browser.

Last modified 3/28/23

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org
...
Translate
LEGEND ,
Mar 07, 2023 Mar 07, 2023

I have only tested on 2022 and 2023 Mac and 2022 Windows at this point. I have a Windows machine with older versions and a Mac at work, and both at home. It should load and show just fine on the Mac, not hidden. Not having issues here.

And yes I want to come up with a better way to edit flags, and I am a newb to exiftool so I just picked what looked like a good set.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 07, 2023 Mar 07, 2023

And one more quick update, please download the "Run EXIFTool" script from Dropbox to replace the "Strip EXIF" script. Thanks 🙂

https://www.dropbox.com/sh/mg817g9a9ymbasi/AADTmXUVxmFfM58bcyYE7yiwa?dl=0

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2023 Mar 07, 2023
LATEST

It's working great on Wondows 10 Bridge 2023. I like the addition of Auto-refresh.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines