selectitems usage for looping through the selected filelist

Discuss and share scripts and script files...
admin
Site Admin
Posts: 66253
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: selectitems usage for looping through the selected filel

Post by admin »

But this command works on all selected files at once, so you should not have to use it too often.

scribbly
Posts: 17
Joined: 03 Jan 2012 13:20
Location: Australia
Contact:

Re: selectitems usage for looping through the selected filel

Post 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

admin
Site Admin
Posts: 66253
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: selectitems usage for looping through the selected filel

Post by admin »

Yes, I'd think so. ( I have no time now to really study your script. )

scribbly
Posts: 17
Joined: 03 Jan 2012 13:20
Location: Australia
Contact:

Re: selectitems usage for looping through the selected filel

Post 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

admin
Site Admin
Posts: 66253
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: selectitems usage for looping through the selected filel

Post by admin »

No. :)

scribbly
Posts: 17
Joined: 03 Jan 2012 13:20
Location: Australia
Contact:

Re: selectitems usage for looping through the selected filel

Post by scribbly »

admin wrote:No. :)
:wink: pity

Post Reply