Main Menu

out.txt file missing

Started by athegn, August 24, 2018, 02:40:35 PM

Previous topic - Next topic

athegn

I have exiftool installed on my desktop at:-

C:\Users\alanf\Desktop\exiftool.exe

I have an image folder on my desktop at:-

C:\Users\alanf\Desktop\Ramblers_Matching

I drag the Rambers_Matching folder to the exiftool icon and the command box runs then closes but there is not an out.txt file on my desktop.

Am I looking in the correct place for this file?

StarGeek

exiftool doesn't create an out.txt file by default.  You probably have to create a batch file in order to redirect into a single file.  Or you could rename exiftool to exiftool(-w .txt -all).exe and when you drop the Ramblers_Matching folder on it, it will create a matching text file for each file in Ramblers_Matching with the tag listing.

May I ask where you got the idea that exiftool would create an out.txt file?
* 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).

athegn

I found this command from Phil??

exiftool -filename -gpslatitude -gpslongitude -T DIR > out.txt

and assumed that a txt file would be created in the DIR

I now have the individual txt files for each image.jpg

I suppose there is no way I could output a single CSV txt file for all images in one folder?

athegn

I found that command at:-

https://exiftool.org/forum/index.php?topic=3075.0

StarGeek

The > out.txt is what creates the out.txt file.  It is called file redirection and a propery of the command line.  In order to create a drag and drop to do that would require the creation of a batch file.

Quote from: athegn on August 24, 2018, 03:51:58 PMI suppose there is no way I could output a single CSV txt file for all images in one folder?

Yes, there absolutely is a way.  On the command line you would type:
exiftool -csv >out.csv DIR
where you would replace DIR with the path to the target directory.

To create a drag and drop icon, you would have to create a batch file.  This works for Windows 10, but I think it would work for Win 7/8

Right click on the desktop, select New->Text Document
Right click the new text document, select edit.  This will open up notepad
Copy this and paste it into the empty document
   exiftool -csv %*  >out.csv
and then save and close notepad
Rename the text document so that it ends in .bat instead of .txt.  If you have file extensions hidden, then post back and I'll find instructions on how to change that.

You can then drag directories on the .bat file and it will create a csv file in the parent directory of the one you dropped.  If need something more complex, then we can work on that next.
* 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).

athegn

I am not sure I completely understand these instructions.

I have created on My Desktop:-

exiftool.bat containing:-

exiftool -csv %*  >out.csv

If I drag my Matching folder over the bat file I get a Libre Office Calc file with Cell A1 containing:-

C:\Users\alanf\Desktop>exiftool -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv -csv C:\Users\alanf\Desktop\Ramblers_Matching   1>out.csv

I guess what I am missing is to tell the bat file what I want it to extract?

What I want is three collumns containing:-

File Name, GPS Latitude, GPS Longitude







Phil Harvey

I don't understand how you get a file like that.  But to extract specific tags, you would do this:

exiftool -csv -gpslatitude -gpslongitude %* > out.csv

You should get SourceFile as the first column, which hopefully will be OK, but contains the full path to the file.  If you want just the FileName too, you can add that to the command.

- 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

I can't figure out how that happened either.  I can't replicate it here.  Without any requested tags, it makes a large csv file with all available tags.

I'm assuming there's a -csv for each file in the test directory.
* 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).

athegn

My Matching folder contains both the image files i.e. jpg and the txt files generated from exiftool.

If I now create a bat file with:-

exiftool -csv -gpslatitude -gpslongitude %* > out.csv

and drag my Matching folder over the icon all I get out.csv with:-

C:\Users\alanf\Desktop> in Cell A1

The same result if I seperate the jpg and txt into two different folders. out.csv still just has:-

C:\Users\alanf\Desktop> in Cell A1

What am I doing wrong.

Alan Clifford

I've had a beer so this may come across as a bit rude.  If so, sorry.  Give up on dragging and dropping.  Just use the command line.

StarGeek

Can you attach your bat file to a post here or link it from something like dropbox?

Does the icon for the batch file look something like this:
* 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: Alan Clifford on August 25, 2018, 01:17:46 PM
I've had a beer so this may come across as a bit rude.  If so, sorry.  Give up on dragging and dropping.  Just use the command line.

Heh, for me, at this point, I'm more interested in the puzzle of why it isn't working.  Solving athegn's problem is now just a happy side effect of solving this riddle. 
* 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).

athegn

Only a beer?

I have had a beer and three glasses of wine; so better leave this until tomorrow!

athegn

Yes Bat file icon does look like that.

Copy/Paste from bat file:-

exiftool -csv -gpslatitude -gpslongitude %* > out.csv

StarGeek

I'm pretty much out of ideas.  Copy/pasted your command into my batch it it works fine.

My last question is a stretch.  What version of exiftool are you running.  Type exiftool -ver into the command line.  Also, maybe there's another, very old, copy of exiftool hiding on your computer?
* 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).