Hello. I haven't used exiftool before. I've read what I'm supposed to do but am a bit confused still.
So. I've downloaded and unzipped exiftool (Windows 11)
I have folders full of files (jpeg thumbnails downloaded from a server) and I want to scan all the files in each folder, to see what, if any, exif data left in them. I believe exif data has already been removed (or GPS data at least), but manually checking all of them would take forever!
I think it sounds easier to use the command line. So - I change the applicationname to exiftool.exe. The unzipped folder is currently in downloads - is it ok to stay in there?
Then what do I type in the command line (my image folders are also in the downloads section).
Edit: I can't get the application with the k on it to do anything. I've tried adding it as an exception to antivirus. If double clicking, it just does nothing. If I try and drop a file in it, it just does nothing. So thought it might be simpler just to change it to .exe and use the command line :-)
I'm fairly familiar with using the commandline, but usually need help with putting the correct syntax/instruction! Thank you.
Quote from: Papa39 on May 08, 2025, 10:18:49 AMSo - I change the applicationname to exiftool.exe. The unzipped folder is currently in downloads - is it ok to stay in there?
It's ok for it to stay there, but that has to be your current directory to run it. Or you can provide the full path to the command to run it. The example you give, all the files in the same directory as exiftool, would work fine.
I would suggest removing the copy you downloaded and installing it with Oliver Betz's exiftool installer (https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows#toc-3). It will install exiftool to a security safe location and add it to the PATH env variable so that exiftool will be available to run everywhere. You would have to close and re-open any command lines after installing.
QuoteThen what do I type in the command line (my image folders are also in the downloads section).
The best command is the one in FAQ #3 (https://exiftool.org/faq.html#Q3). It shows you all known data, including tags that have duplicated names, and the groups they belong to.
If you want to look at a specific group, such as only EXIF data (note that there might be a lot of data in the other groups), you would use
exiftool -G1 -a -s -EXIF:All /path/to/files/You can also use an asterisk as a wildcard. For example, to look at the GPS data, you can use this command, which shows all tags that start with "gps"
exiftool -G1 -a -s -gps* /path/to/files/If you wanted to look at all the date/time tags (a common request), you would use
exiftool -time:all -G1 -a -s /path/to/files/
Quote from: StarGeek on May 08, 2025, 10:48:07 AMQuote from: Papa39 on May 08, 2025, 10:18:49 AMSo - I change the applicationname to exiftool.exe. The unzipped folder is currently in downloads - is it ok to stay in there?
It's ok for it to stay there, but that has to be your current directory to run it. Or you can provide the full path to the command to run it. The example you give, all the files in the same directory as exiftool, would work fine.
I would suggest removing the copy you downloaded and installing it with Oliver Betz's exiftool installer (https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows#toc-3). It will install exiftool to a security safe location and add it to the PATH env variable so that exiftool will be available to run everywhere. You would have to close and re-open any command lines after installing.
QuoteThen what do I type in the command line (my image folders are also in the downloads section).
The best command is the one in FAQ #3 (https://exiftool.org/faq.html#Q3). It shows you all known data, including tags that have duplicated names, and the groups they belong to.
If you want to look at a specific group, such as only EXIF data (note that there might be a lot of data in the other groups), you would use
exiftool -G1 -a -s -EXIF:All /path/to/files/
You can also use an asterisk as a wildcard. For example, to look at the GPS data, you can use this command, which shows all tags that start with "gps"
exiftool -G1 -a -s -gps* /path/to/files/
If you wanted to look at all the date/time tags (a common request), you would use
exiftool -time:all -G1 -a -s /path/to/files/
Thank you very much. The files are .data files (as downloaded from server). Will it read those as well or do I have to convert them to something else first?
I got "exiftool" is not recognised as an internal or external command, operable program or batch file. Maybe because it's Windows 11?
Quote from: Papa39 on May 08, 2025, 11:57:56 AMThank you very much. The files are .data files (as downloaded from server). Will it read those as well or do I have to convert them to something else first?
If they are something like JPEGs with an incorrect
.data extension, then exiftool will read them, but you will need to add the
-ext (
-extension) option (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension) to your command.
-ext+ dataIf they are not image files, then in all likelihood exiftool won't be able to read them. See the Supported File Types table (https://exiftool.org/#supported).
Quote from: Papa39 on May 08, 2025, 12:04:20 PMI got "exiftool" is not recognised as an internal or external command, operable program or batch file. Maybe because it's Windows 11?
No, it's because the directory that exiftool is in isn't part of the PATH env variable. You need to do one of the following:
* Place exiftool in the current directory. This includes the
exiftool_files subdirectory.
* Reinstall exiftool with the installer I linked above. This should (I think) add the exiftool directory to the PATH. This is the best way to do it.
* Provide the complete path to exiftool every time you run it.
* Add the directory that exiftool is in to the PATH. This would be the second-best solution. A quick search pulls up this tutorial (https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Adding-folder-path-to-Windows-PATH-environment-variable.html) on how to do it.
It sounds very complicated! I've now established that a proportion of the files do contain full location data. However the files I'm wanting to strip are in the server, not on computer. So presumably the command line wouldn't work for that. Is there a way to run it via the server?
Quote from: Papa39 on May 08, 2025, 10:05:31 PMIt sounds very complicated!
You should probably read some tutorials about command lines first. The various AI sites like ChatGPT are also pretty good at explaining command line basics.
QuoteI've now established that a proportion of the files do contain full location data. However the files I'm wanting to strip are in the server, not on computer. So presumably the command line wouldn't work for that.
You can mount a server directory as a drive share or access it via the Windows
\\<servername>\ type path. How are you reading the files off of the server? Running exiftool would probably be the same way.
QuoteIs there a way to run it via the server?
Exiftool is a Perl script, so you can run it on any computer that has Perl installed.
Thank you. I decided to download the files from the server onto computer instead. And do it on computer. The files all end in .data. Will exiftool work on that, or do I need to convert them to .jpeg first?
AI said drag and drop exiftool.exe into the folder with all the files in - is that right?
Quote from: Papa39 on May 11, 2025, 11:18:37 AMThe files all end in .data. Will exiftool work on that, or do I need to convert them to .jpeg first?
Answered in my second post.
QuoteAI said drag and drop exiftool.exe into the folder with all the files in - is that right?
Because exiftool can be so complex, you shouldn't trust anything AI says.
I still suggest you re-install using the installer I linked above. That will make exiftool available no matter what directory you are in
But if you do move exiftool to the directory you want to work in, you must also move the
exiftool_files directory as well.
Ok I should have read that before asking AI ha ha. Anyway, I did this on a spare laptop just in case anything went wrong, and used copies of the files.
So I
1) renamed it exiftool.exe
2) copied exiftool.exe and the files folder into the folder with the images in
3) shift and right clicked within the images folder and opened the terminal (apparently so it only worked within that folder).
4) Ran a command to remove gps exif.
For that I had .\exiftool.exe -r -ext data -gps:all .\foldername
Which apparently removed all the gps info.
I could do to check whether that was successful or not. What would I run to check if all files have gps exif removed? The commands you mentioned above don't seem to be recognised doing it this way
Quote from: Papa39 on May 11, 2025, 01:45:37 PMFor that I had
.\exiftool.exe -r -ext data -gps:all .\foldername
Which apparently removed all the gps info.
That command didn't remove anything. It only listed any GPS data that might have existed in EXIF block. It does not list GPS data that might be in other locations such as XMP.
QuoteWhat would I run to check if all files have gps exif removed?
Answered in my first post.
QuoteThe commands you mentioned above don't seem to be recognised doing it this way
I can't comment on this without knowing
exactly what command you used and the
exact output.
[/quote]
Apologies. You're right, I pasted the wrong one. That was the command to check GPS had been removed after running this command
.\exiftool.exe -r -ext data -gps:all= -xmp:geotag= -overwrite_original .
After that it said
129 directories scanned 245 images updated 7534 image files unchanged
It also had some minor warnings for some files with things like "Duplicate XMP property and entries in IFD0 were out of sequence. Fixed."
Does that sound ok?
Quote from: Papa39 on May 11, 2025, 05:27:23 PM-xmp:geotag=
This is nonsense. You use
-xmp:geotag when you want to
set XMP GPS tags. Setting it equal to nothing doesn't do anything.
I would suggest
exiftool.exe -r -ext data -gps*= -overwrite_original .Quote129 directories scanned 245 images updated 7534 image files unchanged
Sounds like most of the files didn't have any EXIF GPS tags. Though it doesn't rule out XMP GPS tags, but those aren't very common, as most programs use the GPS tags in the EXIF group.
QuoteIt also had some minor warnings for some files with things like "Duplicate XMP property and entries in IFD0 were out of sequence. Fixed."
Unless there was an "Error", you probably don't have to worry about it. Exiftool would have fixed some of these things.
Thank you. Yes it was silly of me to rely on AI. I just got a bit desperate! I've been trying to deal with this for days - ie removing GPS location from all the photos within a server (for a website).
I initially ran code to remove it within server. Which worked but corrupted all the files so had to then replace them with the backups and downloaded them to computer and start again with exiftool. (Which I will admit gets my brain very confused).
So you think that command I pasted won't have removed the gps location completely in any files that had it? Yes the vast majority of the files didn't have GPS location exif to start with - I'd already established that. It was only the ones from a particular camera that had the full GPS data on them.
There was one error in the output. "Writing of this type of file is not supported" I think it was just one file.
"I would suggest
exiftool.exe -r -ext data -gps*= -overwrite_original ."
Ok - so maybe I should start again, making new copies from the originals and using the proper code you've suggested above :)
Curious though as to why I needed to put .\exiftool.exe - because it just didn't recognise it if I just put exiftool on its own (it was AI told me to do .\ and it worked then).
I'm guessing you're using PowerShell. CMD is better to use because there are commands that work correctly in CMD and on Mac/Linux, but fail in PowerShell.
Plus, again, first post. Use the installer and you wouldn't have this problem.
Ok I started again. New copies of the files. Copied exiftool.exe and its files into the images folder. Shift and right clicked and opened terminal. Used your code
exiftool.exe -r -ext data -gps*= -overwrite_original .
Terminal couldn't find exiftool and suggested putting .\ in front so did that.
As before, multiple minor warnings about duplicate XMP proerty and a few "Entries in IFD0 were out of sequence. Fixed"
129 directories scanned
235 image files updated
7541 image files unchanged
25 files weren't updated due to errors.
1 error said [minor] IFD1 pointer references previous GPS directory
21 said - Can't read GPS data
2 said Bad GPS offset for GPSVersionID
1 said Writing of this type of file is not supported
When I ran it with the previous code mentioned earlier, it just had the one error (the last one - writing of this type of file is not supported).
Anyway I copied those 25 files into another folder, converted them to jpeg and viewed them in an exif viewer. No GPS co-ordinates on any of them. Five of them have GPSIFD Pointer. Ran some code looking for gps latitude and longitude and there isn't any. So assume I can ignore the GPSIFD pointer in those five files?
Curious to know why it only said 235 images updated, when previously it was 245 though (with the different code)
Ok I've installed the Oliver Betz download on a spare laptop for now - just deleted the exiftool files first. Can't get it to work though.
At the moment I'm just thinking - is the job done now or do I need to fully remove those GPSIFD Pointer bits as well?
I don;'t really want to start working on individual files or taking them out of folders and putting them back a) because the .data file names are very long and b) because I need to re-upload the directory folders to the server afterwards and keep everything in tact in the same position - ie don't want to risk changing file names back and forth and borking the server upload!
I'm hoping that as no latitude or longitude was found in any files - that the GPSIFD Pointer is "dead" and there is nothing hidden for it to point to - would that be the case? Or am I being a bit naive there? Ha ha . Thank you.
Edit - got the Oliver Betz installation to work now (not sure how)
Decided it's too much faffing trying to find little bits of gps data here and there ha ha.
So I found your code on another post for stripping exif and reorientating the photos at the same time.
So done this (if it looks right). First time I tried it, it duplicated files so I added overwrite original on the end.
exiftool -r -ext data -all= -tagsfromfile @ -Orientation -overwrite_original (drop folder here)
Seems to have worked ok - copied a folder and converted it to jpeg to check photos were all the right way round.
Output for 1 folder was
1 directories scanned 701 image files updated 5 image files unchanged
Curious as to why 5 aren't changed! Presumably no exif data to change?
Just wanted to say thank you for your help and patience with me! I was in a rush the other day and sometimes you just need to slow down. I'm sorted now. Once I had the application installed from the site you suggested, and found the command to strip all exif and replace orientation, I could just drag and drop each directory into the command and it was done in no time. Converted copy folders to jpegs to scan through and then ran those through a visual exif scanner and all was as it should be.
Files are now uploaded back in the server. Thank you. It's a clever tool - snd this site has many helpful command examples.