Tracking progress during XMP cleanup

Started by pdupreez, May 23, 2013, 01:19:27 PM

Previous topic - Next topic

pdupreez

I am trying to clean up the XMP data from Picasa in my photos using:

exiftool.exe -r -F -overwrite_original -progress -XMP:All=^ -IPTC:Keywords=^ -ThumbnailImage=^ m:\Photos

which works fine.

However, due to various reasons my cleanup gets interrupted all the time, and I never complete the cleanup because of the size of the job (>100k photos). I can track the progress and log that to a txt file with a dos pipe command such as exiftool -progress xyz>progress.txt which will give me a pointer as to the last file touched. However, I have not found a way to then restart the above command ignoring those files already cleaned.

Making a snapshot of all photos in the M:\Photo directory tree dir /b /s>dirt.txt I could potentially have a way around this by manually editing the file dirt.txt and delete all lines prior to last line in progress.txt.

The big question now for me is how to feed the remainder of the dirt.txt file to exiftool. I tried piping type dirt.txt|exiftool %1 and type dirt.txt|exiftool xyz but these does not seem to work.

Any ideas?

Phil Harvey

Quote from: pdupreez on May 23, 2013, 01:19:27 PM
I am trying to clean up the XMP data from Picasa in my photos using:

exiftool.exe -r -F -overwrite_original -progress -XMP:All=^ -IPTC:Keywords=^ -ThumbnailImage=^ m:\Photos

which works fine.

What are the "^" characters for?

QuoteThe big question now for me is how to feed the remainder of the dirt.txt file to exiftool. I tried piping type dirt.txt|exiftool %1 and type dirt.txt|exiftool xyz but these does not seem to work.

This is what the -@ option is for:

exiftool -@ dir.txt ...

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

pdupreez

Hi Phil. Thanks for the response. I have been trying to search for a solution, and found a few odds&ends around the net which indicated (to my simple mind) that in order to remove a specific tag you set it to ^, however when I run the command, it displays as XMP:all= (i.e. without the ^) so it probably does nothing.

Thanks for the @ info, will follow it up as we speak.

Phil Harvey

Your command interpreter must be eating the "^", because this character isn't special to ExifTool, and setting "-xmp:all=^ will write all XMP tags with a value of "^".

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

pdupreez

#4
Tried the @ command, I think firstly incorrectly using:

exiftool.exe -r -F -overwrite_original -progress -XMP:All= -IPTC:Keywords= -ThumbnailImage= -@ dir.txt m:\Photos

where dir.txt was a directory listing of the files dir /b /s>dir.txt

after not getting anything from there, re-read the command arguments on your website and realised the file.ext used in the -@ argument is supposed to hold the command line arguments. So, I modified each of the dir.txt lines to read as follow:

-F -overwrite_original -progress -XMP:All= -IPTC:Keywords= -ThumbnailImage= M:\Photos\directory\filename.ext

and then ran the command as:

exiftool.exe -@ dir.txt which results in a :

No file specified error

I am obviously doing something wrong, but cannot figure it out yet. Just re-read the -@ argument documentation again. Seems each option needs to be on a separate line. Do I understand it correct, and should each file have an entry in the file as follow:


     -F
     -overwrite_original
     -progress
     -XMP:All=
     -IPTC:Keywords=
     -ThumbnailImage=
     m:\Photos\file.ext



or how can I pipe the filename from an external file or direct listing?
???

pdupreez

Found the solution (I think), should it assist anyone else:

     -F
     -overwrite_original
     -progress
     -XMP:All=
     -IPTC:Keywords=
     -ThumbnailImage=
     m:\Photos\file1.ext
     m:\Photos\file2.ext
     etc etc



Phil Harvey

What you have done will work.  But you don't need the options in the argfile.  You could have done this:

exiftool.exe -r -F -overwrite_original -progress -XMP:All= -IPTC:Keywords= -ThumbnailImage= -@ dir.txt

where "dir.txt" contains all of the file names (full path names, one per line).

- 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: Phil Harvey on May 23, 2013, 01:37:29 PM
Your command interpreter must be eating the "^", because this character isn't special to ExifTool, and setting "-xmp:all=^ will write all XMP tags with a value of "^".

If it's on Windows, the ^ character is an escape character, for when you need to you something like the redirect or pipe symbols (<>|, probably others) as is.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

pdupreez

Thanks Phil. I have been running with the last iteration I made since last night (on about 25% now). Question though, does it cache the dir.txt file before it starts the process, because it just sat there for a very long time before it started showing output/progress.

Phil Harvey

If you use the -progress option, exiftool must first scan the directories to determine which files will be processed.

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