A way to get a single sample from each folder. How?
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
A way to get a single sample from each folder. How?
Hello guys.
Is there a way I could have a single image sample from each subfolder out of a major one? The oldest one, if posible, the output being listed as thumbnails OR as a simple list of files.
A filter out for files under '.thumbnails' folders would be awesome, targeting main folders named 'screenshots' would be cooler.
Thanks in advance.
Is there a way I could have a single image sample from each subfolder out of a major one? The oldest one, if posible, the output being listed as thumbnails OR as a simple list of files.
A filter out for files under '.thumbnails' folders would be awesome, targeting main folders named 'screenshots' would be cooler.
Thanks in advance.
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: A way to get a single sample from each folder. How?
Quicksearch with
=> Not the oldest one
/types={:Image} /limitperdir=1=> Not the oldest one
Code: Select all
$folders = quicksearch("/d", , , "s");
$result = "";
foreach($folder, $folders, <crlf>, "e") {
$files = quicksearch("/n /types={:image}", $folder, , "sm");
$files = regexreplace($files, "^(.+?)\|(.+?)\|(.+?)\|(.+?)\|(.+?)\|(.+?)(?:\r?\n|$)", "$4|$1<crlf>");
$files = formatlist(trim($files, <crlf>), "s", <crlf>);
if ($files) { $result .= gettoken(gettoken($files, 1, <crlf>), 2, "|") . <crlf>; }
}
text $result;
One of my scripts helped you out? Please donate via Paypal
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
Re: A way to get a single sample from each folder. How?
fantastic. many thanks.
appending paperfolder(test, $result); to the code made me a usable list.
".thumbnails" folders are being diisplyed among results. Is there a way to exclude them? It's still a +1000 items bulk.
appending paperfolder(test, $result); to the code made me a usable list.
".thumbnails" folders are being diisplyed among results. Is there a way to exclude them? It's still a +1000 items bulk.
-
jupe
- Posts: 3446
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: A way to get a single sample from each folder. How?
I think you could achieve what you want in an alternative way, should only be a one line script, incl the .thumbnails/screenshots criteria, let me know if you're still interested and I could write up an example.
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: A way to get a single sample from each folder. How?
If you want to prefilter for screenshots folders only, just change the first quicksearch() command:
$folders = quicksearch("screenshots /d", 3:="s");One of my scripts helped you out? Please donate via Paypal
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
Re: A way to get a single sample from each folder. How?
if you don't mind, sure, I'd like to have another approach for this to happen. Many thanks!
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
Re: A way to get a single sample from each folder. How?
thank you, I'll sure give it a try.
is there a way to suppress the distractive notification-bombing happening while the list is build?
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: A way to get a single sample from each folder. How?
Don't use the "s" argument for quicksearch?
One of my scripts helped you out? Please donate via Paypal
-
jupe
- Posts: 3446
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: A way to get a single sample from each folder. How?
Something like this is what I was thinking:
It may need modifying a little, I was unsure if you ony want direct descendants of screentshot folders, or if it could be anywhere in the path hierarchy.
Code: Select all
goto "vi:" . regexreplace(quicksearch("{:Image} /lpd=1 /paths=*\screenshots\* /excl=.thumbnails /p"), "^(.+?)$", '<pick 1.mr/{:Image} ''$1''>'); view(6);
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
Re: A way to get a single sample from each folder. How?
I managed to make some progress here by combining both ideas for better outputs' handling (thanks for that, jupe!).
But I'm missing a way to set a certain combination of columns in a specific order each time I ask for a Details view (view 0). Is there a way to achieve this, guys?
But I'm missing a way to set a certain combination of columns in a specific order each time I ask for a Details view (view 0). Is there a way to achieve this, guys?
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: A way to get a single sample from each folder. How?
setcolumns()?One of my scripts helped you out? Please donate via Paypal
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
-
highend
- Posts: 14923
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: A way to get a single sample from each folder. How?
The very first example shows how you set such columns and
sortby can sort them afterwards...One of my scripts helped you out? Please donate via Paypal
-
Slideshow BoB
- Posts: 41
- Joined: 03 Apr 2024 18:46
Re: A way to get a single sample from each folder. How?
I believe cursing is forbidden around here, as I also like to present myself as an elegant person myself.
So please, picture Severance's Dylan G expressing gratitude appended and followed by some of his well known populace vocabulary. Instead being concise as mr. Milcchick was told to be, 'tks a bunch!'
So please, picture Severance's Dylan G expressing gratitude appended and followed by some of his well known populace vocabulary. Instead being concise as mr. Milcchick was told to be, 'tks a bunch!'
XYplorer Beta Club