Copy random files from various subfolders

Discuss and share scripts and script files...
Post Reply
arirish
Posts: 93
Joined: 13 May 2008 13:52

Copy random files from various subfolders

Post by arirish »

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.

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

Post by admin »

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. :)

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Copy random files from various subfolders

Post by serendipity »

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.
And there you go:
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=4961

I did have better things to do, but i did this instead. :wink:
Actually, I am going to use this everyday on my usb music player.

Post Reply