Let's say I have a text file with the following list:
alfa
bravo
charlie
And I have a file directory with the following folders:
alfa
bravo
charlie
delta
echo
Is there a way I could run the text file through XYplorer and have it only highlight the folder names that match those in the text file (alfa, bravo, charlie)?
Highlighting folders that match the contents of a text file?
-
Megalith
- Posts: 88
- Joined: 24 Jan 2015 16:53
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Highlighting folders that match the contents of a text file?
Code: Select all
$content = readfile("<some path>\<file>.txt");
$sel = "";
foreach($line, $content, <crlf>, "e") {
if (exists("<curpath>\$line") == 2) { $sel .= "<curpath>\$line<crlf>"; }
}
selectitems $sel;One of my scripts helped you out? Please donate via Paypal
-
Megalith
- Posts: 88
- Joined: 24 Jan 2015 16:53
Re: Highlighting folders that match the contents of a text file?
Thanks.
I also learned that this can be done with voidtools's Everything search.
I also learned that this can be done with voidtools's Everything search.
XYplorer Beta Club