News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

how to avoid "press RETURN" at the end of processing

Started by jjmonot, November 02, 2017, 03:34:30 AM

Previous topic - Next topic

jjmonot

Hello

I am using the command-line application using a call from a windows program I have made.

This program uses an open command from the windows API, opening then a DOS console windows, where the command line is executed with the parameters for exiftool.exe.

I am already using this technique for other command line image libraries (LibRaw with simple_dcraw.exe for example), and at the end of the processing the DOS console window closes automatically.

The trouble here is that, at the end of the processing, the program (or the PERL shell ?) asks for a "press RETURN", and the DOS console windows is still open. This is not what I would like .. i would like automatic closure of the window.

How can I bypass the "press RETURN" ?

Phil Harvey

The "-- press RETURN --" pause is a result of using the -k option.  Make sure you aren't using this option, and that you have renamed "exiftool(-k).exe" to "exiftool.exe".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jjmonot

Thank you !!!! this trick is so simple !!! ... I was wondering why you are indicating in the doc to rename the .exe : I understand now !

Maybe you could add in the doc that with -k the script stops at the end, and without k it finishes "normally" ?

Phil Harvey

If you run "exiftool(-k).exe" without any arguments, you should see this:

NAME
    exiftool - Read and write meta information in files

RUNNING IN WINDOWS
    Drag and drop files or folders onto the exiftool executable to display
    meta information, or rename to "exiftool.exe" and run from the command
    line
to access all exiftool features.

    This stand-alone Windows version allows simple command-line options to
    be added to the name of the executable
(in brackets and separated by
    spaces at the end of the name), providing a mechanism to use options
    when launched via the mouse. For example, changing the executable name
    to "exiftool(-a -u -g1 -w txt).exe" gives a drag-and-drop utility which
    generates sidecar ".txt" files with detailed meta information. As
    shipped, the -k option is added to cause exiftool to pause before
    terminating
(keeping the command window open). Options may also be added
    to the "Target" property of a Windows shortcut to the executable.

[...]
       -k (-pause)
            Pause with the message "-- press any key --" or "-- press RETURN
            --" (depending on your system) before terminating.  This option is
            used to prevent the command window from closing when run as a
            Windows drag and drop application.
[...]


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).