Find all tags

Discuss and share scripts and script files...
highend
Posts: 9879
Joined: 06 Feb 2011 00:33

Re: Find all tags

Post by highend »

All files that appear in the window are either tagged, labelled or have a comment.

Code: Select all

    $lb = "<crlf>";
    $items = "";
    foreach($item, "<get SelectedItemsPathNames <crlf>>", $lb) {
        if (exists($item) == 1) { $items = $items . $item . report("?{Tags}?{Label}?{Comment}", $item) . $lb; }
        else { $items = $items . folderreport("files:{fullname}?{Tags}?{Label}?{Comment}", "r", $item, "r", , $lb) . $lb; }
    }

    $tagged = regexmatches($items, ".*?\?\w+\?\?$", $lb);
    $labelled = regexmatches($items, ".*?\?\?\w+\?$", $lb);
    $commented = regexmatches($items, ".*?\?\?\?\w+$", $lb);
    $items = regexmatches(formatlist($tagged . $lb . $labelled . $lb . $commented, "dents", $lb), "^.*?(?=\?)", $lb);

    if ($items) {
        if (confirm("Tags/Labels/Comments present. View?")) { text $items; }
    } else { status "Selected items neither have a tag, label or comment", , "stop"; }
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Post Reply