ExifTool Forum

ExifTool => Newbies => Topic started by: pdupreez on May 23, 2013, 01:19:27 PM

Title: Tracking progress during XMP cleanup
Post by: 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.

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?
Title: Re: Tracking progress during XMP cleanup
Post by: Phil Harvey on May 23, 2013, 01:23:42 PM
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
Title: Re: Tracking progress during XMP cleanup
Post by: pdupreez on May 23, 2013, 01:31:10 PM
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.
Title: Re: Tracking progress during XMP cleanup
Post by: 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 "^".

- Phil
Title: Re: Tracking progress during XMP cleanup
Post by: pdupreez on May 23, 2013, 02:18:03 PM
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?
???
Title: Re: Tracking progress during XMP cleanup
Post by: pdupreez on May 23, 2013, 02:58:56 PM
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


Title: Re: Tracking progress during XMP cleanup
Post by: Phil Harvey on May 23, 2013, 07:32:33 PM
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
Title: Re: Tracking progress during XMP cleanup
Post by: StarGeek on May 24, 2013, 03:31:42 AM
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.
Title: Re: Tracking progress during XMP cleanup
Post by: pdupreez on May 24, 2013, 05:06:48 AM
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.
Title: Re: Tracking progress during XMP cleanup
Post by: Phil Harvey on May 24, 2013, 07:53:02 AM
If you use the -progress option, exiftool must first scan the directories to determine which files will be processed.

- Phil