Author Topic: Shortcuts for Windows Explorer 'Send To' right-click menu  (Read 2804 times)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #15 on: January 03, 2020, 11:27:23 AM »
Yes.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #16 on: January 03, 2020, 02:55:24 PM »
I'm pushing my luck...

There is another Windows SendTo Shortcut script that extracts all preview/thumbnail images and places them in the same folder as the input file.  It works, but I would prefer to create subfolders for the extracted images.  No matter what I try, I'm getting an error...

"C:\Program Files\Digital Light & Color\Picture Window Pro 8\exiftool.exe" -a -b -W %d%f.%e_%t%-c.%s -progress -r -k -preview:all

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 5539
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #17 on: January 03, 2020, 03:00:06 PM »
The %d is the directory of the file being proccessed, including trailing slash.  The %f is the name of the file without the extension.  Put the name of your subfolder between them.
%dSubfolder/%f
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #18 on: January 03, 2020, 03:12:38 PM »
Awesome!  Thanks!

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #19 on: January 04, 2020, 05:35:53 AM »
Hmm... Another porblem that I'm too ignorant to solve.  Here is the SendTo Shortcut script that I believe reads OS file creation date and sticks its year into the EXIF:Copyright tag. 

%PWP%\exiftool.exe -EXIF:Artist="Maciej Tomczak" -d %Y "-EXIF:Copyright<Copyright (c) $FileCreateDate Maciej Tomczak / www.phototramp.com / Unlicensed use prohibited." -P -r -overwrite_original -progress -k

I set Windows environment variable %PWP% that points to the folder where exiftool.exe is, to shorten the script.

While I'm royally confused about different file and metadata date and time stamps, where they are kept and what events can change them, I guessed that TimeDateOriginal would be the camera EXIF date stamp.  I decided against it and in favour of FileCreateDate as some images may be stripped of EXIF and the script will fail. 

I imagine the -if command could be used to check if TimeDateOriginal is there, but I don't know how to make -if to produce an alternative output (i.e. FileCreateDate) if the condition fails.

Perhaps there are some other date tricks that could be used to make my script better, but I need a EXIFTool Jedi for that...

Cheers!

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #20 on: January 04, 2020, 07:38:23 AM »
While I still haven't solved my conditional copyright year dilemma, thanks to StarGeek I figured out a short way of writing copyright to EXIF, IPTC, and XMP in one go.  The -IPTC:Credit="..." is there to populate the IPTC as without it -MWG doesn't want to write there.

%PWP%\exiftool.exe -IPTC:Credit="Maciej Tomczak" -MWG:Creator="Maciej Tomczak" -d %Y "-MWG:Copyright<Copyright (c) $FileCreateDate Maciej Tomczak / www.phototramp.com / Unlicensed use prohibited." -P -r -overwrite_original -progress -k

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 18415
    • ExifTool Home Page
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #21 on: January 04, 2020, 08:43:28 AM »
I imagine the -if command could be used to check if TimeDateOriginal is there, but I don't know how to make -if to produce an alternative output (i.e. FileCreateDate) if the condition fails.

You don't use -if for this.  Instead, do this:

%PWP%\exiftool.exe -EXIF:Artist="Maciej Tomczak" -d %Y "-EXIF:Copyright<Copyright (c) $FileCreateDate Maciej Tomczak / www.phototramp.com / Unlicensed use prohibited." "-EXIF:Copyright<Copyright (c) $DateTimeOriginal Maciej Tomczak / www.phototramp.com / Unlicensed use prohibited." -P -r -overwrite_original -progress -k

The second assignment will overwrite the first if DateTimeOriginal exists.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #22 on: January 05, 2020, 07:56:33 AM »
Great, thanks!

One more iteration: if I want to simplify the issue and just use DateTimeOriginal and, rather than looking for FileCreateDate, just skip the year in the copyright info if the EXIF date doesn't exist? 

The way I tried it before, no copyright tags are written if DateTimeOriginal is specified but missing.

Cheers!

mcjtom

  • Jr. Member
  • **
  • Posts: 17
Re: Shortcuts for Windows Explorer 'Send To' right-click menu
« Reply #23 on: January 05, 2020, 01:20:47 PM »
I think I solved it with the -f option.  It prints "-" when the -DateTimeOriginal doesn't exist.  And the bonus is that my notice is still within 260 characters of Windows Shortcut Target limit, which simplifies things for me.

%PWP%\exiftool.exe -IPTC:Credit="Maciej Tomczak" -MWG:Creator="Maciej Tomczak" -f -d %Y "-MWG:Copyright<Copyright (c) $DateTimeOriginal Maciej Tomczak / www.phototramp.com / Unlicensed use prohibited." -P -r -overwrite_original -progress -k
« Last Edit: January 05, 2020, 01:33:10 PM by mcjtom »