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.

Jom

QuoteThis 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.)
I just wanted to shorten the quote. Of course, I read everything, but there are features of translation that make it difficult to understand.

StarGeek

Quote from: andreikorzhyts on July 17, 2019, 03:30:10 AM
I thought that it is possible to make somehow in a forum, without third-party hosting.

Imgur is a free image hosting site that allows you to upload anonymously without making an account.  Though if you do so, you can't delete it later if you want. It also strips all metadata from the image for privacy.

Technically, it is possible to attach an image and inline it in the post, though it is a two step procedure.  First, attach the image and then post.  Then go back to your post, right-click->copy url on the attachment, edit the post to include the image.

For example:
* 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

QuoteTechnically, it is possible to attach an image and inline it in the post, though it is a two step procedure.  First, attach the image and then post.  Then go back to your post, right-click->copy url on the attachment, edit the post to include the image.
It's so easy, why didn't I think  :o. Thanks. I guess I'm tired of learning exiftool in a foreign language. But worth it. In Russian, no one has done lessons on ExifTool. Maybe I'll be the first.

Jom

But I'd like to get back to subject about bat-files.

If there is a exe-version for Windows, is there any reason to using on Windows perl-version of ExifTool? What is she made for?

Phil Harvey

The Perl versions is for people who already have Perl installed.  And people who want to use the API with their own Perl scripts.

- 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

QuoteThe Perl versions is for people who already have Perl installed.  And people who want to use the API with their own Perl scripts.
Are these people convenient to type >perl exiftool.pl or >exiftool.pl instead >exiftool or just >e?
Maybe I don't know something, but I created my own bat-files and just use >e.

Hayo Baan

If I remember correctly (it's been a while since I worked on Windows' command line), if you make pl an executable extension you don't need to type it.
Hayo Baan – Photography
Web: www.hayobaan.nl

Jom

Quoteif you make pl an executable extension
I never needed it and I don't know how to do it. Wrote that through the register. I will take an interest itself.

Jom

On Windows, what filename extensions denote an executable?
https://superuser.com/questions/228680/on-windows-what-filename-extensions-denote-an-executable/228693

Everything is simple and probably bat-file is not needed. But then it need to add to the documentation how to do it. I will use this method.

In conclusion, I would like to know the final opinion of Phil.

Phil Harvey

There are very, very many different ways to use Exiftool -- I don't think it makes sense to try to add them all to the documentation.

- 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 ($).

obetz

Quote from: andreikorzhyts on July 17, 2019, 11:16:29 AM
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.

did you copy the stand alone exiftool.exe to the same directory as the Perl version of ExifTool?

The stand alone exiftool.exe inserts the directory where the exe is placed as first entry of the library search paths.

This is is a (somewhat dangerous) flaw of the PAR/pp packer used to generate exiftool.exe, see https://exiftool.org/forum/index.php/topic,10144.msg52866.html

So  never put the standalone exe version in the same directory as the "Perl ExifTool", or any other directory containing a "lib" directory!

My new ExifTool for Windows package separates the exe (just a small launcher) from the ExifTool and Perl files by a clearly named subdirectory, so you can place it anywhere. It's not yet widely used but I did thorough testing and use it myself so I consider it stable.

Oliver

Jom

Quotedid you copy the stand alone exiftool.exe to the same directory as the Perl version of ExifTool?
Yes.

QuoteThe stand alone exiftool.exe inserts the directory where the exe is placed as first entry of the library search paths....
...So  never put the standalone exe version in the same directory as the "Perl ExifTool", or any other directory containing a "lib" directory!
I understand, thanks.

QuoteMy new ExifTool for Windows package separates the exe (just a small launcher) from the ExifTool and Perl files by a clearly named subdirectory, so you can place it anywhere. It's not yet widely used but I did thorough testing and use it myself so I consider it stable.
Why it require a new project? Why it is impossible to improve the project of Phil?

obetz

Quote from: andreikorzhyts on July 17, 2019, 06:21:16 PM
Why it require a new project? Why it is impossible to improve the project of Phil?

currently, I'm just the one pushing it, so it's on my web site.

Oliver

Jom


Quotecurrently, I'm just the one pushing it, so it's on my web site.


Oliver
Why you the one pushing it? You offered to Phill this option?

Phil Harvey

This is a relatively new development and I haven't had time to look into this in detail yet or set up my Windows environment to build this version.

- 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

So these are separate projects temporarily?

Phil Harvey

I would say it is a branch of the same project.
...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. e., there is changed only installation especially for Windows, but exiftool is original?

Phil Harvey

...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 ($).

obetz

Quote from: andreikorzhyts on July 18, 2019, 12:04:55 PM
I. e., there is changed only installation especially for Windows, but exiftool is original?

The link I provided contains all details, here the short version: It's original "plain ExifTool" plus a stripped "portable Strawberry Perl" plus my own tiny launcher, packed together in a ZIP file or provided as an installer.

Oliver

Jom

#35
QuoteThe link I provided contains all details, here the short version: It's original "plain ExifTool" plus a stripped "portable Strawberry Perl" plus my own tiny launcher, packed together in a ZIP file or provided as an installer.

Oliver
I pressed ctrl+f in my browser and didn't find the word "reason" on your website's home page.
The most important thing is to write first the reasons for the creation of the modification of the original and only then everything else.
You did a good job, but after reading the main page of your site, I have unanswered the main questions:
1. What is the reason of the modification?
2. Do you change the original code or not?
The answers to these questions, I only got on this forum.

If you want to distribute your product, you must be absolutely clear write in the first lines of its pedigree, otherwise nobody does not know what they choose.
I didn't even immediately pay attention to ExifTool because I needed a tool not just for exif data. I was looking for "AllMetadataTool".
The causal component in your product description is important.

obetz

Quote from: Andrei Korzhyts on July 18, 2019, 06:05:30 PM
I pressed ctrl+f in my browser and didn't find the word "reason" on your website's home page.
The most important thing is to write first the reasons for the creation of the modification of the original and only then everything else.

Please make sure to read thoroughly before complaining.

After the introductory description "convenient installer and a robust portable package", the first paragraph of ExifTool for Windows is named "Purpose" being a synonym for "reason". It has a list of three improvements (convenient, permissive, clean).

The last of these three items links to Portable Perl Applications to explain more technical details about pp. This page starts with "Requirements", that's nothing else than "reasons to do something" in engineering. You likely need to read the whole page to understand the issues, but only if you are interested in the technical background.

Quote from: Andrei Korzhyts on July 18, 2019, 06:05:30 PM
2. Do you change the original code or not?
The answers to these questions, I only got on this forum.

It seems you didn't read the last paragraph "Sources" on ExifTool for Windows where the steps are described to build the package. This describes also a small patch to ExifTool.

Quote from: Andrei Korzhyts on July 18, 2019, 06:05:30 PM
If you want to distribute your product, you must be absolutely clear write in the first lines of its pedigree, otherwise nobody does not know what they choose.
I didn't even immediately pay attention to ExifTool because I needed a tool not just for exif data. I was looking for "AllMetadataTool".
The causal component in your product description is important.

I'm open to all constructive suggestions.

Oliver

Jom

#37
Oliver, you misunderstood me.
I tried to help you by writing the impression as if it were an ordinary user who does not know programming, but tries to find a necessary tool.
When an ordinary user wants to find a tool, he is faced with a lot of different offers from professionals to dilettante.
If you make a potential ordinary user strain to understand the essence of your product and the reasons for its appearance, then most likely he will not understand anything and will go to look for a "program with buttons".
There is no need to force the photographer to follow the links and load with technical terms, he will not understand anything and will not want to spend time on research.
The technical side should be, programmers love to be tormented at find details  :), but the first paragraph on the main page should be in plain language and clearly give the opportunity for an ordinary user to understand your product fits him or not.
But if you have done site for programmers, it means I misunderstood you. Sorry.

Talk about the presentation of the product should be conducted in a separate forum branch. In this thread's initial question was closed.