sylikc / pyexiftool

PyExifTool (active PyPI project) - A Python library to communicate with an instance of Phil Harvey's ExifTool command-line application. Runs one process with special -stay_open flag, and pipes data to/from. Much more efficient than running a subprocess for each command!
Other
144 stars 17 forks source link

delete metadata #89

Open krolaper opened 3 weeks ago

krolaper commented 3 weeks ago

Tell me how to correctly delete all metadata in a file and overwrite it?

I tried this:

with exiftool.ExifTool() as et:
    print(et.execute(*["-all:all="] + ['/path/file']))
    #or print(et.execute(*["-all="] + ['/path/file']))

but the result:

0 image files updated
    1 files weren't updated due to errors

and metadata is not cleared

by the way, as a result it writes: 0 image. This is not entirely correct, because I’m trying to clean up the .docx file

sylikc commented 1 week ago

first, what is the command you would run on the command line to clear all the metadata. From there, we can decipher how the call should be constructed in pyexiftool

Show a run on the command line, what was input, and what was output from exiftool. Expected output given a certain input...