Search/Filter for <selitems> ?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
eil
Posts: 1869
Joined: 13 Jan 2011 19:44

Search/Filter for <selitems> ?

Post 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. :cry:
i spend hours reading through Help about Filter(), Multi-branch-view, get('SelectedItemsPathNames', '|') and all of these aren't giving a hand :veryconfused:
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! :roll: or maybe it's time for some command to get upgrade?(i found some similar wishes were stated in past)
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Search/Filter for <selitems> ?

Post 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.
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1869
Joined: 13 Jan 2011 19:44

Re: Search/Filter for <selitems> ?

Post 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?!
Win 7 SP1 x64 100% 1366x768|1900x1080

highend
Posts: 14953
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Search/Filter for <selitems> ?

Post 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...
One of my scripts helped you out? Please donate via Paypal

eil
Posts: 1869
Joined: 13 Jan 2011 19:44

Re: Search/Filter for <selitems> ?

Post 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). :veryconfused: i understand there probably should be recursion here, but with which command?!

add: did it! :biggrin: but it's a horror how one should twist brain to get such almost everyday-needed info :evil:

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
			}
	}
    }
Win 7 SP1 x64 100% 1366x768|1900x1080

Post Reply