Page 1 of 1

Paste information from external column

Posted: 21 Sep 2022 17:09
by n00bs
Hi!

I need some help with a functionality I haven't been able to figure out on my own.
Is it possible to paste information that is different for every file from an excel column into a custom column in Xyplorer?

Specifically, I would like to generate a unique ID for every WAV file in Python and then import that list into a custom Xyplorer column (the one titled "UnID"). I did the ones in the attachment by hand but that method takes a long time and is prone to human error.

Any help is appreciated!

Re: Paste informatoin from column

Posted: 21 Sep 2022 17:26
by highend
Copy the Excel column into the clipboard (Ctrl+c), go into XY, select the belonging files (count must match!) and execute that script:

Adapt "ex1" to whatever extra column you're using for storing the tags

Code: Select all

    $sel = <get SelectedItemsPathNames>;
    end (!$sel),  "No item(s) selected, aborted!";
    end (!<clp>), "Nothing in clipboard, aborted!";

    $i = 1;
    foreach($tag, <clp>, <crlf>, "e") {
        $item = gettoken($sel, $i, <crlf>);
        tagitems("ex1", $tag, $item);
        $i++;
    }

Re: Paste information from external column

Posted: 22 Sep 2022 08:07
by n00bs
Thank you so much! It works great!

Re: Paste information from external column

Posted: 22 Sep 2022 10:48
by admin
Cool script indeed! :appl: