bat-file for Windows

Started by Jom, July 16, 2019, 04:35:45 PM

Previous topic - Next topic

Jom

Hello, Phil.

I use Windows.
To run ExifTool I must type in commandline:
>perl exiftool.pl ...

But can be done bat-file with name exiftool.bat or e.bat (content Is somewhere saw):
@echo OFF
:: in case DelayedExpansion is on and a path contains !
setlocal DISABLEDELAYEDEXPANSION
perl "%~dp0exiftool.pl" %*


Now you can do this:
>e -ver
instead:
>perl exiftool.pl -ver

It makes sense to add a exiftool.bat or/and e.bat to ExifTool for Windows?

I use such a file, but when upgrading I have to copy it again to the ExifTool folder.

Phil Harvey

You should be able to run exiftool by typing "exiftool.pl -ver" if you set the appropriate association for .pl files in the Windows registry.  I don't know how to do this, but it is an option in the ActivePerl installation.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Jom

I understand, but I want to typing only exiftool or just e.
Screenshot was attached.

Jom

This is not a critical wish, but for Windows it is obvious. That's why I'm interested if it's possible that in the future these bat-files will appear in ExifTool for Windows.

Phil Harvey

Is there any reason you are not using the Windows .exe version of ExifTool?  For this you just type "exiftool".

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

Jom

1.
QuoteNote: The most recent production release is Version 11.50. (Other versions are considered development releases, and are not uploaded to CPAN.)
But exe-version only 11.55.

2.
Quote11.55 [Warning: Library version is 11.50]
What does this notice mean? It seems that something is missing.

3.
QuoteNote that these versions contain the executable only, and do not include the HTML documentation or other files of the full distribution above
It seems that something is missing. What is is other files?

4.
Quotedrag-and-drop files and folders to view meta information
I did not understand how to do it.

5. I understood the difference between exiftool(-k).exe and exiftool.exe.
I run both, but I see only the documentation and can not do anything.
Press q or press Ctrl+c does not help.

In result, I chose Perl-version.

StarGeek

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
4.
Quotedrag-and-drop files and folders to view meta information
I did not understand how to do it.

5. I understood the difference between exiftool(-k).exe and exiftool.exe.
I run both, but I see only the documentation and can not do anything.
Press q or press Ctrl+c does not help.

The -k option holds the window open after you drag and drop.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Jom

Спасибо.
I understand. But this do not work in Total Commander, only in Explorer.

How to place image into message?

Hayo Baan

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
1.
QuoteNote: The most recent production release is Version 11.50. (Other versions are considered development releases, and are not uploaded to CPAN.)
But exe-version only 11.55.
11.55 is newer than 11.50 :)

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
2.
Quote11.55 [Warning: Library version is 11.50]
What does this notice mean? It seems that something is missing.
I don't know, when do you get this message? If you get this when running the perl version, I think it means you are running the exiftool command from 11.55, but that it finds (and uses) the installed exiftool libraries from 11.50.  That would be an indication of an installation error.

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
3.
QuoteNote that these versions contain the executable only, and do not include the HTML documentation or other files of the full distribution above
It seems that something is missing. What is is other files?
Other files are e.g. configuration, argument, and format file examples.

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
4.
Quotedrag-and-drop files and folders to view meta information
I did not understand how to do it.
I think Stargeek's video made it clear to you.

Quote from: andreikorzhyts on July 17, 2019, 12:56:23 AM
5. I understood the difference between exiftool(-k).exe and exiftool.exe.
I run both, but I see only the documentation and can not do anything.
Press q or press Ctrl+c does not help.

In result, I chose Perl-version.
If you get just the help message, that means you are simply not providing any argument to the exiftool command. Whether you use the perl version or the .exe version does not really alter how it behaves... In your case, I think the .exe version will be easiest. If you're on the command-line, strip (-k) from the command-name (or make a copy).

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

Quote from: andreikorzhyts on July 17, 2019, 01:08:34 AM
How to place image into message?
Click the button above the smiley row and put the link to the image in between. 

Ends up like this
[img]https://i.imgur.com/qnmGuCD.gif[/img]
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Jom

Quote from: StarGeek on July 17, 2019, 02:41:01 AM
Quote from: andreikorzhyts on July 17, 2019, 01:08:34 AM
How to place image into message?
Click the button above the smiley row and put the link to the image in between. 

Ends up like this
[img]https://i.imgur.com/qnmGuCD.gif[/img]
I thought that it is possible to make somehow in a forum, without third-party hosting.
But. thanks.

Jom

Quote11.55 is newer than 11.50 :)
Yes, I understand.  :) But then why this phrase
The most recent production release is Version 11.50
?

QuoteI don't know, when do you get this message? 11.55 [Warning: Library version is 11.50]
I run >exiftool -ver for exe-version from command line. Why does this version check the installed library? Isn't this version self-contained with its built-in library?

QuoteIf you get just the help message, that means you are simply not providing any argument to the exiftool command.
I just duble-click on exiftool.exe.  I immediately see the manual and if I try to get out of it, the program is closed.

Hayo Baan

Quote from: andreikorzhyts on July 17, 2019, 03:58:02 AM
Quote11.55 is newer than 11.50 :)
Yes, I understand.  :) But then why this phrase
The most recent production release is Version 11.50
?
Because Phil differentiates between "production" releases which he also uploads to CPAN (the perl archive) and "development" releases. The product release are less frequent since they cost more effort to build by Phil.

Quote from: andreikorzhyts on July 17, 2019, 03:58:02 AM
QuoteI don't know, when do you get this message? 11.55 [Warning: Library version is 11.50]
I run >exiftool -ver for exe-version from command line. Why does this version check the installed library? Isn't this version self-contained with its built-in library?
Yes, but I guess you also have the perl version installed which it finds first...

Quote from: andreikorzhyts on July 17, 2019, 03:58:02 AM
QuoteIf you get just the help message, that means you are simply not providing any argument to the exiftool command.
I just duble-click on exiftool.exe.  I immediately see the manual and if I try to get out of it, the program is closed.

So indeed you are not providing any arguments :) exiftool.exe should be used as a command-line tool, just like you would exiftool.pl.

If you rename exiftool.exe to exiftool(-k).exe you can do StarGeeks thing and drop files on it. You can include other arguments as well e.g. exiftool(-k -ver).exe will just show the version of exiftool when executed.

Quote from: andreikorzhyts on July 17, 2019, 03:30:10 AM
Quote from: StarGeek on July 17, 2019, 02:41:01 AM
Quote from: andreikorzhyts on July 17, 2019, 01:08:34 AM
How to place image into message?
Click the button above the smiley row and put the link to the image in between. 

Ends up like this
[img]https://i.imgur.com/qnmGuCD.gif[/img]
I thought that it is possible to make somehow in a forum, without third-party hosting.
But. thanks.
Yes it is: click Attachments and other options and upload your file(s) from there.
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Quote from: andreikorzhyts on July 17, 2019, 03:58:02 AM
But then why this phrase
The most recent production release is Version 11.50

This is explained if you read the whole line:

The most recent production release is Version 11.50. (Other versions are considered development releases, and are not uploaded to CPAN.)

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

Jom

QuoteBecause Phil differentiates between "production" releases which he also uploads to CPAN (the perl archive) and "development" releases. The product release are less frequent since they cost more effort to build by Phil.
Now I understand. The point is that the versions are released often and the uploading of each version to CPAN will be excessively labor-intensive, because this is another more complex process than just the release version? I was not familiar with CPAN, so at first I thought that the production version was located there. And other newer versions are still test ones. Now I understand that it is safe to always download the new version itself, regardless of what is uploading to CPAN.

QuoteYes, but I guess you also have the perl version installed which it finds first...
Yes, firstly I install Perl and Perl-version. then Phil write Is there any reason you are not using the Windows .exe version of ExifTool?  For this you just type "exiftool". and I began to try exe-version witout uninstalling both Perl-version and Perl. But I do not understand why exe-version checks the library, she's independent.

QuoteSo indeed you are not providing any arguments :) exiftool.exe should be used as a command-line tool, just like you would exiftool.pl.
Ха-ха-ха (ha-ha-ha). I now understand. I double-clicked, saw a window and tried to enter commands in it. I misunderstood the purpose exe-version.  ;D
It's funny how far you can go wrong with simple things.

QuoteYes it is: click Attachments and other options and upload your file(s) from there.
Yes, but the picture will be in the form of a link, and I want it to be shown in the message itself.