Script for Random File Selection?

Discuss and share scripts and script files...
Post Reply
beeellecee
Posts: 16
Joined: 29 Dec 2021 18:57

Script for Random File Selection?

Post by beeellecee »

Is it possible in theory to create a script that would select 16 (or any definable number) files from a given folder with the option to select how many have specific labels/tags etc? Perhaps also the option to then copy these files into a sequentially labelled folder nested inside the search folder.

I would have a specific musical purpose for this to select files from a curated collection using various levels of probability.

I am new to XY so not yet familiar with all the possibilities - but I do like the scripting potential :)

highend
Posts: 13330
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script for Random File Selection?

Post by highend »

Sure it is
One of my scripts helped you out? Please donate via Paypal

beeellecee
Posts: 16
Joined: 29 Dec 2021 18:57

Re: Script for Random File Selection?

Post by beeellecee »

highend wrote: 29 Dec 2021 22:37Sure it is
That has made my day! My next question is...how would I achieve this :D - I am versatile when it comes to playing instruments, not so much with scripting!

highend
Posts: 13330
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Script for Random File Selection?

Post by highend »

This supports 3 modes:
1. Random selection by number (e.g. 15 => Select 15 files)
2. Selection by label / tag (e.g. red => Select all files with with the label or tag red)
3. Random selection by number AND label / tag (e.g. 5 mint => Select 5 of all files with the label or tag mint)

Zero guarantee, highly untested...

If this is not what you wanted, rewrite it^^
One of my scripts helped you out? Please donate via Paypal

beeellecee
Posts: 16
Joined: 29 Dec 2021 18:57

Re: Script for Random File Selection?

Post by beeellecee »

highend wrote: 30 Dec 2021 15:59 This supports 3 modes:
1. Random selection by number (e.g. 15 => Select 15 files)
2. Selection by label / tag (e.g. red => Select all files with with the label or tag red)
3. Random selection by number AND label / tag (e.g. 5 mint => Select 5 of all files with the label or tag mint)

Zero guarantee, highly untested...

If this is not what you wanted, rewrite it^^

Select files randomly by number, label or tag_v0.1.xys
Wow! That is pretty much perfect Highend! I am going to test it now! Thank you!

Post Reply