Search code examples
metadataexifexiftool

ExifTool - How to remove all metadata from all files possible inside a folder and all its subfolders?


How can I remove all the metadata from all the files inside a folder and its subfolders?

I've already tried several commands without any success. All of them were tied to a specific file extension and/or didn't go through all the subfolders inside.


Solution

  • You would use
    exiftool -all:all= -r /path/to/files/

    This command creates backup files. Add -overwrite_original to suppress the creation of backup files.

    You don't want to use wildcards to try to limit file selection (see Common Mistake #2). For that you would use the -ext (extension) option.

    Exiftool won't process any file that isn't on the writable file type list (see ExifTool FAQ #16), so files like AVI or MKV will be skipped.

    You do not want to use this command on a RAW file type, such as NEF or CR2, as that will remove data that is required to render the image. See ExifTool FAQ #8.