Hello
I am trying to write a Windows 7 batch file to remove all metadata from a range of file types (e.g. .jpg, .tif, pdf) but retain the file system dates (e.g. FileModifyDate, FileAccessDate, FileCreateDate) for each file.
This is the syntax I have configured so far but not all the metadata is removed and the dates all change when updated.
exiftool -all= -tagsFromFile @ -FileModifyDate= -overwrite_original *.jpg
exiftool -all= -tagsFromFile @ -FileModifyDate= -overwrite_original *.pdf
exiftool -all= -tagsFromFile @ -FileModifyDate= -overwrite_original *.png
exiftool -all= -tagsFromFile @ -FileModifyDate= -overwrite_original *.tif
I would be very grateful if someone could point me in the right direction.
Regards
PuppyCat :)
Use the -P option to preserve as many of the filesystem times as possible. On Windows 7, this should preserve the FileModifyDate and FileCreateDate.
- Phil
Hi Phil
That worked perfectly. Thanks so much for your help.
I have formatted my batch file as:
exiftool -all= -preserve -overwrite_original *.jpg
exiftool -all= -preserve -overwrite_original *.pdf
exiftool -all= -preserve -overwrite_original *.png
exiftool -all= -preserve -overwrite_original *.tif
I tried to use the syntax below to force processing files with any extension, instead of listing each extension individually, but it didn't work. Any ideas on his one?
exiftool -all= -preserve -overwrite_original -ext "*" DIR
Regards
PuppyCat ;)
Ok. Silly me I worked it out :-[
Solution:
exiftool -all= -preserve -overwrite_original "*"