Display Random Files
-
jdev21
- Posts: 45
- Joined: 08 Oct 2014 22:13
Display Random Files
I would like to click a button or catalog item to display a certain amount of random files (5,10, or 20) in the current directory. Each time its clicked it shows a new random set of files. Is this possible to do?
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Display Random Files
Code: Select all
filter;
$allFiles = listpane(, , 1+4);
$amount = gettoken("5|10|20", rand(1, 3), "|");
$files = gettoken(formatlist($allFiles, "x"), $amount, "|", , 1);
filter "$files", 1+4;One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club