Would it be possible to have a script that, at the touch of a button, could look at a folder and its subfolders, and take a random selection of, say, 400 files from among those subfolders, and copy them to a new location? Even better if it could clear out the new location first!
I'm looking for an easy way to put a random selection of songs on a usb stick, without having to do it all manually. I should perhaps add that it will always be looking at the same parent folder (though the subfolders are subject to regular change), and will always be copying to the same location.
Thanks guys, I know you have better things to do with your time.
Copy random files from various subfolders
-
admin
- Site Admin
- Posts: 66249
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Copy random files from various subfolders
You can do this without scripting. List all contents of the branch (menu Edit / Show all items in branch), and then shuffle the results using menu View / Current Tab / Sort By / Random Order. Then take the top 400. 
FAQ | XY News RSS | XY X
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Copy random files from various subfolders
And there you go:the_hyrax_lord wrote:Would it be possible to have a script that, at the touch of a button, could look at a folder and its subfolders, and take a random selection of, say, 400 files from among those subfolders, and copy them to a new location? Even better if it could clear out the new location first!
I'm looking for an easy way to put a random selection of songs on a usb stick, without having to do it all manually. I should perhaps add that it will always be looking at the same parent folder (though the subfolders are subject to regular change), and will always be copying to the same location.
Thanks guys, I know you have better things to do with your time.
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=4961
I did have better things to do, but i did this instead.
Actually, I am going to use this everyday on my usb music player.
XYplorer Beta Club