I need some code that will choose a random file in a preset directory. I've googled for it and I can't find anything that would suit.
Would this be the flow to code a random file selector: ?
-Open a directory as an array (eg fso.getfolder("c:\folder"))
-count how many objects in the array
-generate a random number between zero and 1 and multiply it by the amount of objects in the array, and add 1
-open the file number from the above result
Anyone got any better methods?
Would this be the flow to code a random file selector: ?
-Open a directory as an array (eg fso.getfolder("c:\folder"))
-count how many objects in the array
-generate a random number between zero and 1 and multiply it by the amount of objects in the array, and add 1
-open the file number from the above result
Anyone got any better methods?