selectitems usage for looping through the selected filelist
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: selectitems usage for looping through the selected filel
But this command works on all selected files at once, so you should not have to use it too often.
FAQ | XY News RSS | XY X
-
scribbly
- Posts: 17
- Joined: 03 Jan 2012 13:20
- Location: Australia
- Contact:
Re: selectitems usage for looping through the selected filel
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?admin wrote:But this command works on all selected files at once, so you should not have to use it too often.
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: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: selectitems usage for looping through the selected filel
Yes, I'd think so. ( I have no time now to really study your script. )
FAQ | XY News RSS | XY X
-
scribbly
- Posts: 17
- Joined: 03 Jan 2012 13:20
- Location: Australia
- Contact:
Re: selectitems usage for looping through the selected filel
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 catadmin wrote:Yes, I'd think so. ( I have no time now to really study your script. )
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; Code: Select all
$success = #1074;Though I've got no idea if that would work in your framework... just wondered as an idea
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
scribbly
- Posts: 17
- Joined: 03 Jan 2012 13:20
- Location: Australia
- Contact:
Re: selectitems usage for looping through the selected filel
admin wrote:No.
XYplorer Beta Club