Page 2 of 2

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 12:08
by admin
But this command works on all selected files at once, so you should not have to use it too often.

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 12:18
by scribbly
admin wrote:But this command works on all selected files at once, so you should not have to use it too often.
That's very true... I guess I could cut the script into two parts: one to set the exif data and secondly to copy exif date to filedate?
scribbly wrote:

Code: Select all

focus;
  END (<curitem>=="", "Select one file to compare with");
  $source= <curitem>; 

  focus pi;

  $pane2files = get("SelectedItemsPathNames", "|");
  $destination = "";
  foreach($token,$pane2files,"|") {
  	$destination = $destination . quote($token);
  }

  $items= getinfo ("CountItems");
  END ($items==0);

  run """C:\Program Files (x86)\ExifTool\exiftool.exe"" -TagsFromFile ""$source"" -GPS:All -DateTimeOriginal -DateTimeDigitized $destination -v2",,1;
  #1074; // Set Modified date to DateTimeOriginal

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 12:21
by admin
Yes, I'd think so. ( I have no time now to really study your script. )

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 12:29
by scribbly
admin wrote:Yes, I'd think so. ( I have no time now to really study your script. )
It's OK: that's not why I quoted it, just putting it into context. There's always more than one way to skin the cat 8)

By The By: Do these commands return a value (i.e. on success / failure / numbers / etc)?

I think in the perfect case, for scripting, that the script can decide how it's best to manage feedback. So

Code: Select all

#1074; 
would be handled by XYplorer, where as

Code: Select all

$success = #1074;
would be handled by the script.

Though I've got no idea if that would work in your framework... just wondered as an idea

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 13:08
by admin
No. :)

Re: selectitems usage for looping through the selected filel

Posted: 09 Jan 2012 13:22
by scribbly
admin wrote:No. :)
:wink: pity