Almost complete script needs some fixing

Started by Alyssa, July 24, 2014, 10:36:02 AM

Previous topic - Next topic

Phil Harvey

Are you sure the "_original" file isn't from an earlier command?  It should never create this backup if -overwrite_original is used.  Windows 8 shouldn't make a difference.

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

Alyssa

Yes in noticed after that it wasn't added because the overall line exceeded the limit of the maximum number of characters in a shortcut.

Original:
C:\exiftool.exe -d "%d/%m/%Y Custom Text %H:%M:%S[%a]" -P "-exif:XPComment<${file:filecreatedate;s/\[lun\]/[Monday]/;s/\[mar\]/[Tuesday]/;s/\[mer\]/[Wednesday]/;s/\[gio\]/[Thursday]/;s/\[ven\]/[Friday]/;s/\[sab\]/[Saturday]/;s/\[dom\]/[Sunday]/}" -overwrite_original

After:
C:\exiftool.exe -d "%d/%m/%Y Custom Text %H:%M:%S[%a]" -P "-exif:XPComment<${file:filecreatedate;s/\[lun\]/[Monday]/;s/\[mar\]/[Tuesday]/;s/\[mer\]/[Wednesday]/;s/\[gio\]/[Thursday]/;s/\[ven\]/[Friday]/;s/\[sab\]/[Saturday]/;s/\[dom\]/[Sunday]/}" -overwrite_o

So I was looking to do things in another way, using a .bat file...so I tried to write the exact line into a txt file plus adding a directory's path and save it as .bat
Its as it follows

C:\exiftool.exe -d "%d/%m/%Y Custom Text %H:%M:%S[%a]" -P "-exif:XPComment<${file:filecreatedate;s/\[lun\]/[Monday]/;s/\[mar\]/[Tuesday]/;s/\[mer\]/[Wednesday]/;s/\[gio\]/[Thursday]/;s/\[ven\]/[Friday]/;s/\[sab\]/[Saturday]/;s/\[dom\]/[Sunday]/}" -overwrite_original C:\Users\Random\Desktop\Test 2\

Also tried by specify the extension

C:\exiftool.exe -d "%d/%m/%Y Custom Text %H:%M:%S[%a]" -P "-exif:XPComment<${file:filecreatedate;s/\[lun\]/[Monday]/;s/\[mar\]/[Tuesday]/;s/\[mer\]/[Wednesday]/;s/\[gio\]/[Thursday]/;s/\[ven\]/[Friday]/;s/\[sab\]/[Saturday]/;s/\[dom\]/[Sunday]/}" -overwrite_original C:\Users\Random\Desktop\Test 2\*.jpg

Other random try

C:\exiftool.exe -d "%d/%m/%Y Custom Text %H:%M:%S[%a]" -P "-exif:XPComment<${file:filecreatedate;s/\[lun\]/[Monday]/;s/\[mar\]/[Tuesday]/;s/\[mer\]/[Wednesday]/;s/\[gio\]/[Thursday]/;s/\[ven\]/[Friday]/;s/\[sab\]/[Saturday]/;s/\[dom\]/[Sunday]/}" -overwrite_original C:\Users\Random\Desktop\Test 2\*.*

But Its not working, still trying to it figure out as I am writing this.

Phil Harvey

Hi Alyssa,

You need to double all "%" characters in a .BAT file, as I mentioned earlier.

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

Alyssa

#18
Yeah I just realized the error. Thanks everyone for the help, now it should be perfect. Cheers.

Edit:
Sorry,one little last thing,I noticed exiftool don't like some characters like ì (used in Lunedì, italian for Monday), how I can make it write it?

I have tried with -charset Latin but it writes ý instead of ì

Edit #2:
I solved with -E command and &igrave; for "ì"