Page 1 of 1

Find only files in (certain) subdirs ?

Posted: 03 Feb 2024 10:15
by SL09
I would like to find ONLY the files in Subdirs D:\Example1\_, D:\Example7\_, D:\Example15\_, ...
NOT the ones in the Dirs D:\Example1\, D:\Example7\, D:\Example15\
without naming / selecting them all - there are many :D

('include subdirs' shows all files ...)
Is there some logic hidden in the Search dialog ? or would this need some scripting (which is alway complicated) ?

Re: Find only files in (certain) subdirs ?

Posted: 03 Feb 2024 10:47
by highend

Code: Select all

    $result = quicksearch("/f", <curpath>, , "s");

    // Remove all found files inside the first level subfolders of <curpath>
    // E.g.:
    // <curpath> = D:\!tests
    // D:\!tests\Example1\a.txt   => Remove
    // D:\!tests\Example1\_\a.txt => Keep
    $escaped = regexreplace(<curpath>, "([\\^$.+()\[{])", "\$1");
    $pattern = $escaped . "\\[^\\]+?\\[^\\]+?(\r?\n|$)";
    $result  = regexreplace($result, $pattern);
    paperfolder("Search result", $result);

Re: Find only files in (certain) subdirs ?

Posted: 03 Feb 2024 11:04
by admin
By the way: I did not like the commas in the old Poppins font; they looked like dots. Also, the slashes were too wide.
So I made it like the main website font (which is 'Open Sans' 17px), but use "em" for the font size, which comes out *slightly* different and better here (more consistent line height).
So: Poppins 1.2em --> Open Sans 1.4em

Before:
XYForumPost-Font-Poppins-1.2em.png
After:
XYForumPost-Font-OpenSans-1.4em.png