Page 1 of 1
Search/Filter for <selitems> ?
Posted: 17 Jul 2015 20:45
by eil
probably it me, but i'll say as i feel = why it's so difficult to operate with selected items?? i needed a way to check selected items to have tags/labels, in
here highend was very kind to spend time and provide few variants, but still it's not really what was desired.
i spend hours reading through Help about Filter(), Multi-branch-view, get('SelectedItemsPathNames', '|') and all of these aren't giving a hand
i tried to make a var with paths for MBV -it doesn't support files in address line; var with "compilated" parameters for Search -again no "use selected as field"; Filters are flat and allow only file names(no nested paths).
please, spirits of XY, help me if there is a way!

or maybe it's time for some command to get upgrade?(i found some similar wishes were
stated in past)
Re: Search/Filter for <selitems> ?
Posted: 17 Jul 2015 21:39
by highend
but still it's not really what was desired.
It does what was asked for. It informs the user if any selected file or any file in a selected folder contains a tag, label or comment. If you don't like it in a window, let the script switch to branch view and use selectitems or put them in a paper folder and display that.
Re: Search/Filter for <selitems> ?
Posted: 17 Jul 2015 22:10
by eil
i don't have complains about your script highend, i myself said text could be used and thankful for help. but after numerous variants(mine too) i see tab display as better variant -allows to see color for labels and do some action about files(not just list of text). but i can't get it to work without over-smart ways. yet i remember Don not once stated proudly about "optimized search: database first everything then" -so for me not obvious why no simple way to check?!
Re: Search/Filter for <selitems> ?
Posted: 17 Jul 2015 22:34
by highend
Again, put them in a paperfolder? It even shows color labels (but ofc no subfolder structures). Filtering on a branch view would also work but it can lead to unwanted matches if more files with the same name exist. There are pro and cons, decide...
Re: Search/Filter for <selitems> ?
Posted: 18 Jul 2015 14:19
by eil
for the moment paperfolder() is the only visually good way
but i can't get a full list of selected paths(all sub-dirs/files included).
i understand there probably should be recursion here, but with which command?!
add: did it!

but it's a horror how one should twist brain to get such almost everyday-needed info
Code: Select all
$item = ""; $tags = ""; $sub = "";
foreach($item, get('SelectedItemsPathNames', '|')) { //getting initial selected paths
if (exists($item) == 1) { //if files
if (tagitems( , , "$item") != "") {$tags = $tags . $item . "<crlf>"; } //checking files for tags
}
else { if (tagitems( , , "$item") != "") {$tags = $tags . $item . "<crlf>"; } //if folders
$sub = folderreport("items", "r","$item" , "r", , "<crlf>"); //getting all sub-items
foreach($item, $sub, "<crlf>") {
if (tagitems( , , "$item") != "") {$tags = $tags . $item . "<crlf>"; } //checking folder sub-items for tags
}
}
}