Page 1 of 1
Display Random Files
Posted: 11 Nov 2015 03:36
by jdev21
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?
Re: Display Random Files
Posted: 11 Nov 2015 08:33
by highend
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;
The same could be done with the help of a paperfolder but I guess the visual filter solution is sufficient?