News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

File properties in a single row with tabs separating?

Started by alsv75, March 21, 2017, 01:54:40 PM

Previous topic - Next topic

alsv75

Hi!

I need to use ExifTool to extract properties from TIF files. So far I have managed to do this:

I have placed exiftool.exe in the image folder. In the command prompt I chose the same folder and wrote the following:
exiftool -XResolution -ImageWidth -ImageHeight *.tif

This provides an outcome looking like this:

======== 00023567.tif
X Resolution                    : 600
Image Width                     : 2913
Image Height                    : 3616
======== 00023568.tif
X Resolution                    : 600
Image Width                     : 5530
Image Height                    : 2637

QUESTIONS

However, I have two questions:

1) I also need the file size. Which tag do I use for that? (Is tag the correct word?)

2) Is it possible to change the way the properties are presented? I would prefer to have all properties of a file presented in a single row with tabs separating, because then it is easy to copy to a text editor or Excel and use for my purposes. This means I would prefer the above example to be something like this instead:

00023567.tif   600   2913   3616
00023568.tif   600   5530   2637

Thanks in advance!

Alex

alsv75

A third question:

3) It seems there is a restriction in the command prompt regarding how many "posts" (or what to call it) are presented.

For example, when I write "exiftool -XResolution -ImageWidth -ImageHeight *.tif" in the command prompt regarding a folder with 280 image files, it says "280 image files read", but only the properties of the last approximately 60 image files are shown. And it is not possible to scroll upwords to view former results.

I'm thankful for all help!

Alex

Phil Harvey

Hi Alex,

Quote from: alsv75 on March 21, 2017, 01:54:40 PM
1) I also need the file size. Which tag do I use for that? (Is tag the correct word?)

Yes. "Tag" is correct.  The tag is "FileSize".  See FAQ 2 for some help with this.

Quote2) Is it possible to change the way the properties are presented? I would prefer to have all properties of a file presented in a single row with tabs separating

Sure.  Try this: exiftool -T -filename -filesize -imagewidth -imageheight DIR

Quote3) It seems there is a restriction in the command prompt regarding how many "posts" (or what to call it) are presented.

You can change the scrollback buffer size for the cmd window in the "Properties" settings.  I can't help with the details right now, so hopefully you can figure this out.  Alternative, pipe the output to file then open the file with a text editor:

exiftool -T -filename -filesize -imagewidth -imageheight DIR > out.txt

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

StarGeek

Quote from: alsv75 on March 21, 2017, 01:54:40 PM
1) I also need the file size. Which tag do I use for that? (Is tag the correct word?)

Use -FileSize.  And tag is the correct word.

Quote2) Is it possible to change the way the properties are presented? I would prefer to have all properties of a file presented in a single row with tabs separating, because then it is easy to copy to a text editor or Excel and use for my purposes.

Add -T to the command.

As for your third question, I'm not sure why you can't scroll up.  In Windows, both the CMD and PowerShell have a scroll bar. 

If you're on Windows 7 or greater, there's an option that could help you out.  Since you mention that you want to copy to Excel or text editor, you can pipe the output of exiftool directly into the clipboard.  Add | clip to the end of your command and the output will be saved in the clipboard.

So try this for your command:
exiftool -T -XResolution -ImageWidth -ImageHeight -FileSize *.tif | clip
* 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).

StarGeek

Quote from: Phil Harvey on March 21, 2017, 02:23:10 PM
You can change the scrollback buffer size for the cmd window in the "Properties" settings.  I can't help with the details right now, so hopefully you can figure this out.

TIL.  Here's a link to change it.  I never changed mine and it's set at OVER 9000 (insert meme here) (9,001 actually), which is large enough for me to have never run into a problem with it.
* 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).

alsv75

A great thank you, Phil and StarGeek! It works very well now: I have all the properties I need and in a tab separated text file, which is very convenient.

Greetings,
Alex

irljc

Quote from: Phil Harvey on March 21, 2017, 02:23:10 PM
Hi Alex,

Quote2) Is it possible to change the way the properties are presented? I would prefer to have all properties of a file presented in a single row with tabs separating

Sure.  Try this: exiftool -T -filename -filesize -imagewidth -imageheight DIR

- Phil

Many thanks Phil, This helped me out this afternoon, but using different tags.  :)