DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: DONE: Random (real random) file from folder and subfolders  (Read 173,427 times)

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #25 on: March 09, 2009, 04:45 PM »
I'm curious about the randomness of this script. Could you make a simple thing with the same random-engine as in Pick Me and then wait for user input of:
- Number of choices
- Number of times to do the experiment

And then a resultpage where it sums up the number of times each choice has been randomly chosen.

This all is because I sometimes think it's not that random.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #26 on: March 09, 2009, 05:22 PM »
I'm curious about the randomness of this script. Could you make a simple thing with the same random-engine as in Pick Me and then wait for user input of:
- Number of choices
- Number of times to do the experiment

And then a resultpage where it sums up the number of times each choice has been randomly chosen.

This all is because I sometimes think it's not that random.

It's Visual Basic 6's rnd() function.

rndtest.zip (12.2 KB)

What do you suggest? random.org? :-)

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #27 on: March 09, 2009, 07:51 PM »
I'm curious about the randomness of this script. Could you make a simple thing with the same random-engine as in Pick Me and then wait for user input of:
- Number of choices
- Number of times to do the experiment

And then a resultpage where it sums up the number of times each choice has been randomly chosen.

This all is because I sometimes think it's not that random.

It's Visual Basic 6's rnd() function.
(see attachment in previous post)
What do you suggest? random.org? :-)
Well I see that the first and the last number are getting a significant lower rate... What's that doc?

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #28 on: March 09, 2009, 08:23 PM »
Well I see that the first and the last number are getting a significant lower rate... What's that doc?

Fixed. It was a rounding issue.
Thanks mouser  :-*



Feel free to redownload the app. Also added the splitted rar archives thingy.

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #29 on: March 09, 2009, 09:23 PM »
Ok but I still think it's not really random. I've click my shortcut to get a random file like 10 times, and i got the same one 4 times and some other one 2 times and another one 2 times. Total files: like 100.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #30 on: March 09, 2009, 09:26 PM »
Ok but I still think it's not really random. I've click my shortcut to get a random file like 10 times, and i got the same one 4 times and some other one 2 times and another one 2 times. Total files: like 100.

Are you running the latest version? It doesn't do that to me!

Try this one.
« Last Edit: March 09, 2009, 09:29 PM by scancode »

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #31 on: March 10, 2009, 01:17 PM »
Ok but I still think it's not really random. I've click my shortcut to get a random file like 10 times, and i got the same one 4 times and some other one 2 times and another one 2 times. Total files: like 100.

Are you running the latest version? It doesn't do that to me!
Try this one.
I think it is better. Did you do something about the rnd function?

neptitude

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 5
Re: REQ - Random (real random) file from folder and subfolders
« Reply #32 on: March 10, 2009, 01:18 PM »
:Thmbsup: Thanks for this! I've been looking for an app like this for ages, and when I saw it mentioned on LifeHacker, I got a big smile on my face, flew over here and joined up!

I have a request for the app, which actually would sort of help with the "real random" issue Coeluh is talking about. Right now, when you are dragging files out of the list and into a folder you are copying them. If you also had the choice to MOVE the files to the new folder, running PickMe again on the original folder wouldn't be able to have any duplicates! (I know this isn't really what Coeluh is thinking about, but...)

This would be very useful for me, since I'm trying to break up a folder of a couple of thousand images into several sets of 100. Is this possible?

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #33 on: March 10, 2009, 01:52 PM »
I think it is better. Did you do something about the rnd function?

No! :-P
I made the file extension case insensitive.

I have a request for the app, which actually would sort of help with the "real random" issue Coeluh is talking about. Right now, when you are dragging files out of the list and into a folder you are copying them. If you also had the choice to MOVE the files to the new folder, running PickMe again on the original folder wouldn't be able to have any duplicates!

Sure, gimme a couple minutes. Probably will have to do with right-click dragging :-)
« Last Edit: March 10, 2009, 01:56 PM by scancode »

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #34 on: March 10, 2009, 01:57 PM »
I think it is better. Did you do something about the rnd function?

No! :-P
I made the file extension case insensitive.
Does that give more randomness? I thought it wouldn't.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #35 on: March 10, 2009, 02:16 PM »
I think it is better. Did you do something about the rnd function?

No! :-P
I made the file extension case insensitive.
Does that give more randomness? I thought it wouldn't.

It does.

Say you have

file1.mpg
file2.3gp
file3.avi
file4.3GP
file5.MPG
file6.AVI

and your extension list was mpg;avi;3gp

Pick me! would've used only the first three entries, and leave the rest alone.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: REQ - Random (real random) file from folder and subfolders
« Reply #36 on: March 10, 2009, 02:21 PM »
Regarding neptitude's request, one thing you could do is have an "exclusion" list, and a button that adds the current results to this exclusion list.

That way you could pick 100 files for example, then click the button to add them to exclusion list (could just be a text editable memo); then if you clicked for another 100 files you would be garanteed not get any duplicates since the first picked files are now on the exclusion list.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #37 on: March 10, 2009, 04:31 PM »
New version is out!

14:24 10/03/2009
  • Bugfix: When using ALT+F4 to abort the current operation, Pick me! kept running on the background.
  • Bugfix: More rounding issues.
  • Code cleanup.
  • XP Styles support (!)
  • Now tracks moved/deleted files.
  • Modified dragging code to use  right mouse button. Now you get a nice popup menu.

Download (VB6 runtimes required on Windows 9x/NT/2000)

Coeluh

  • Family Guy ^^
  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 273
Re: REQ - Random (real random) file from folder and subfolders
« Reply #38 on: March 12, 2009, 03:33 PM »
New version is out!

14:24 10/03/2009
  • Bugfix: When using ALT+F4 to abort the current operation, Pick me! kept running on the background.
  • Bugfix: More rounding issues.
  • Code cleanup.
  • XP Styles support (!)
  • Now tracks moved/deleted files.
  • Modified dragging code to use  right mouse button. Now you get a nice popup menu.

Download (VB6 runtimes required on Windows 9x/NT/2000)
Awesome!

Glorfyboy

  • Participant
  • Joined in 2010
  • *
  • Posts: 1
Re: REQ - Random (real random) file from folder and subfolders
« Reply #39 on: November 10, 2010, 03:41 PM »
I hate to ressurect such an old topic, but this program is perfect for my needs, all except the fact that it writes to the registry. Is there any way to get it to write instead to a file within its containing folder? I use it as a portable application so the fact that it writes to the registry can cause some problems.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #40 on: November 10, 2010, 04:18 PM »
Sure. I have the sources for it @ the office, will change it when I get there...

Also, I'm back!

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: REQ - Random (real random) file from folder and subfolders
« Reply #41 on: January 21, 2011, 01:59 PM »
Download link fixed. Portable version in the works.

elfie

  • Participant
  • Joined in 2012
  • *
  • Posts: 1
Re: DONE: Random (real random) file from folder and subfolders
« Reply #42 on: September 17, 2012, 04:53 AM »
Hi,

So.. I have an external hard drive, marked H:
I have 500 files in H:, and I also have 9 subdirectories in H:

For some reason, when I use PickMe, it only finds files in the subdirectories, never in the root of H:
However.. when I move all 500 files into a new subdirectory, H:\blahblah, it now magically finds the files from the subdirectories it found before, as well as the new one, H:\blahblah.

Why can't it find files that are on the root of the drive? Why do they have to be in a folder, before PickMe recognizes them?

And yes.. I have included all the correct extensions.
I have run the program before on this computer and it worked just fine (on a different folder). Occurs on both Windows 7 and 8.
« Last Edit: September 17, 2012, 05:27 AM by elfie »

Yoshi8765

  • Participant
  • Joined in 2012
  • *
  • Posts: 1
Re: DONE: Random (real random) file from folder and subfolders
« Reply #44 on: December 11, 2012, 03:17 AM »
Apologies for reviving an old thread, but I have a problem with this program.
It gives me Error 76 (Path not found) in procedure DirWalk

But the path is correct... I picked a folder that exists...

celerygeneral99

  • Participant
  • Joined in 2013
  • *
  • Posts: 1
Re: DONE: Random (real random) file from folder and subfolders
« Reply #45 on: January 15, 2013, 05:00 AM »
Dude, thank you to the developer of this little program.  It was exactly what I was looking for...

And to answer the question as to WHAT on earth this could be used for:  I have a ton of emulator files for various gaming consoles (Sega, Nintendo, Playstation, etc) all in one folder with various subfolders for each corresponding system and the HUGE selection can be a bit overwhelming when just wanting to select a random game out of the lot.

So, I use the extensions "gb;n64;nes;bin;gg;sfc;smc" to randomly select a game from all consoles... or I can even narrow it down to a specific console.

Thank you for this.  This is extremely useful. :Thmbsup:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: DONE: Random (real random) file from folder and subfolders
« Reply #46 on: January 15, 2013, 05:04 AM »
Always fun to see someone reporting that they find a program from a donationcoder member useful. :up:

Jon Codispoti

  • Participant
  • Joined in 2013
  • *
  • Posts: 1
Re: DONE: Random (real random) file from folder and subfolders
« Reply #47 on: June 06, 2013, 10:04 PM »
A cool enhancement would be the capability to select that the program pick it's files based on:

Number of results (as done currently)
-or-
Size of results

Being able to fill my media device to exactly the right level would be much easier this way.
If I only have 10 GB free on my device, I would like to be able to pick as many random selections as I can, but just no larger than 10 GB.

2muchacid

  • Participant
  • Joined in 2014
  • *
  • Posts: 4
Re: DONE: Random (real random) file from folder and subfolders
« Reply #48 on: June 19, 2014, 06:45 PM »
Hi

I'm getting this Run time error '6: Overflow

http://s11.postimg.org/v5x7qv1er/ovwerflow.jpg

Can you please fix this or what can I do?

Thanks!

TUTRider

  • Participant
  • Joined in 2014
  • *
  • Posts: 2
Re: DONE: Random (real random) file from folder and subfolders
« Reply #49 on: June 23, 2014, 09:42 PM »
First time in this forum so if I post this in the wrong plcae or anything, let me know.
I started using the program "PickMe" and it is great, only problem is I get an error message when it is going through my music. It goes through all the artists A-E just fine, and picks from them, but then throws this error. (A picture is attached to this post)
Can anyone tell me how to fix this error?
I am running W8 Pro, 64bit.
« Last Edit: June 23, 2014, 10:57 PM by TUTRider »

Original address: https://www.donationcoder.com/forum/index.php?topic=17316.0