I would like to remove the exif/metadata from all .JPG files in a directory. Here's what I have so far, but part of me doesn't think this will work, so...help?
import os
from gi.repository import GExiv2
rootdir = "c:\directory\subdirectory\subdirectory2"
def noMeta(file):
exif = GExiv2.Metadata(file + ".jpg")
exif.clear_exif()
exif.clear_xmp()
exif.save_file()
for root, dir, files in os.walk(rootdir):
for file in files:
if file.lower().endswith(".jpg"):
noMeta(file)