Main Menu

Mass batch removal

Started by jgarcon, December 11, 2024, 02:20:20 PM

Previous topic - Next topic

jgarcon

I basically need exiftool to do mass batch data removal. This means all files that are within folders and folders. I dont need it for a folder full of images, these are thousands of folders each with images and text files in them.

I need it so that it will take ONE folder with thousands of folders that have text files and images within then to batch remove all exif data at once.

I've been told this command :
exiftool -r -all= /path/to/directory/with/images/
should do the job

However after installing I cannot get it to work:

C:\Users\business>exiftool

'exiftool' is not recognized as an internal or external command,
operable program or batch file.

I've put the files in the programs folder and its also in my user folder. I've tried running it as exiftool.exe too

Any help? thanks

StarGeek

The problem your having is that exiftool isn't in a directory that is part of the PATH variable.

I would suggest downloading and using Oliver Betz's exiftool installer. That will make it available for use globally. You would just have to close and reopen your command window.

Alternatively, you could manually add the directory exiftool is in to your path.
1) Click the Start button
2) type "edit env" and select "Edit the system environment variables"
3) click the "Enviroment Variables" button
4) look for the PATH variable in the list. The top list is local to the current user, and the bottom would be for all users.
5) Click edit, type in the path to exiftool, click ok until Ok, Ok, Ok

The command you listed will create backup files. Add the -overwrite_original option to suppress the creation of backup files.
This way might require rebooting the computer, I'm not sure.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

jgarcon

youre a lifesaver thank you

that being said I have a question, so from what I've searched exif data is the technical aspect of the image

I'd also like to remove the metadata which I believe has the information like which computer user created the image, the author etc... correct me if Im wrong

what is the command line for removing the all metadata on a path? or is there a command to remove both metadata and exifdata, basically all data on the image, at once rather than doing it separately?

thank you so much in advance

StarGeek

The command you listed using -All= removes all data that can be removed. But there are things that cannot be removed. For example, anything that is part of the file system. Tags like FileModifyDate/FileCreateDate cannot be removed. But file system tag don't survive things like uploading a file to a website.

There are other tags that cannot be removed, but can be blanked out. Date/time tags in an MP4/Mov video for example. Those can be blanked by their name (e.g. -Quicktime:CreateDate=). In the case of time based tags in a video, you can also use -Time:All= to blank them.

There are tags that should not be removed in some files. The Adobe APP14 block should not be removed as it can severely change the colors of the file. Removing the ICC_Profile will also change the colors, but usually it is more subtle, the images "pop" less when doing so. And you should never remove all data from a RAW file type such as CR2, NEF, ARW, etc., as this will irrevocably destroy the image.

Also in videos, exiftool cannot remove EXIF data and GPS tracks. This is because they are non-standard, meaning they aren't supposed to be there, but camera companies shove them in anyway. And every company does so in different ways. The only way to remove those are with ffmpeg with a command like this
ffmpeg -i input.mp4 -c copy -map 0 -map_metadata -1 output.mp4

Note that this is a lossless operation, it does not recompress the video. It just copies the streams directly.

PDFs also need to be mentioned. Exiftool uses the incremental update function of PDFs to update the files (see "Incremental Updates in PDF files", Debenu Foxit). This does not remove any previous data and such changes are reversible. In order to make the changes permanent, the file needs to be re-liniarized by a program such as Adobe Acrobat (see here) or qpdf (run qpdf --linearize --replace-input file.pdf).
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

jgarcon

perfect thanks a lot

so to conclude all data is removed from images this way besides the colours and creation dates

Phil Harvey

Quote from: jgarcon on December 13, 2024, 12:55:01 PMso to conclude all data is removed from images this way besides the colours and creation dates

No.  But you need to specify the file format to be able to answer this properly.  For JPEG images, all metadata including the colour profile (but not the Adobe APP14, which stores colour space information) and all date/times will be removed.  For other formats the answer is different.

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

jgarcon

#6
Quote from: Phil Harvey on December 13, 2024, 12:58:59 PM
Quote from: jgarcon on December 13, 2024, 12:55:01 PMso to conclude all data is removed from images this way besides the colours and creation dates

No.  But you need to specify the file format to be able to answer this properly.  For JPEG images, all metadata including the colour profile (but not the Adobe APP14, which stores colour space information) and all date/times will be removed.  For other formats the answer is different.

- Phil

for png and jpg its not the same?

Some images are png but still it seems the metadata was sucessfully wiped am I wrong?

also why does exiftool double the folder size of the select folder after batch meta data removal even though size of every document remains the same?

exiftool -ee3 -U -G3:1 -api requestall=3 -api largefilesupport FILE
is saying file not found, Im trying to use it to see ALL of the metadata, any idea why its not working?

thanks

Phil Harvey

ExifTool wipes EXIF, XMP, ICC and native PNG text tags from PNG images (and maybe a bit more), but there may still be other unknown metadata left behind.

The problem with PNG and TIFF (and maybe other formats) is that there is no clear distinction between metadata and image data like there is in JPEG.  PNG does have a flag to indicate tags that are not crucial, but deleting these does affect some images, so a blanket approach like this isn't possible.

- 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: jgarcon on December 13, 2024, 04:28:36 PMalso why does exiftool double the folder size of the select folder after batch meta data removal even though size of every document remains the same?

By default, exiftool creates backupfiles with _original appended to the filename, i.e. file.jpg gets a backup file called file.jpg_Original.

You can add the -overwrite_original option to suppress the creation of backup files.

You can use the -delete_original/-restore_original options to delete or restore the originals.


Quoteexiftool -ee3 -U -G3:1 -api requestall=3 -api largefilesupport FILE
is saying file not found, Im trying to use it to see ALL of the metadata, any idea why its not working?

If exiftool reports "File not found" then you have not given the correct path/name to the file.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype