So i have at the time about hundreds Videos and Funscripts from my collection. Sometimes when i want to play, i just confuse about which videos should i play, even there’s still some videos that i have never watch because my pickiness (idk if it’s a word lol).
that’s why i would like to ask, do you guys have any idea or ways how to choose randomly a file out from a folder, especially in windows 10 os. I used to write in google random number, but i found it so complicated and waste time.
You can save the following as random.bat (or anything you want, as long as the extension is .bat):
@echo off
setlocal EnableDelayedExpansion
cd C:/path/to/your/funscripts
set n=0
for %%f in (*.*) do (
set /A n+=1
set "file[!n!]=%%f"
)
set /A "rand=(n*%random%)/32768+1"
echo "!file[%rand%]!"
pause
On line 3 replace C:/path/to/your/funscripts with your actual path. The code is from here, just slightly modified to print the file name instead of copying it somewhere.
Once it’s saved, just double click the file and it will give you the name of a random file in your scripts folder.
Are you using Script Player to play your scripts? Very easy way to use for the randomness. You can simply add a whole folder and then just let them play randomly. Chapter mode is also great and puts even more randomness in.
cd !myfolder!
set n=0
for %%f in (*.*) do (
set /A n+=1
set “file[!n!]=%%f”
)
set /A “rand=(n*%random%)/32768+1”
echo “!file[%rand%]!” @echo “!myfolder!!file[%rand%]!”| clip
pause
This will also copy the full file address and name into your clipboard. for quick playing.
Also you can replace the line
for %%f in (*.*) do (
with
for %%f in (*.*m*) do (
to have it only select video files, As most video file extensions include “m”.
Tangentially related to this I’ve not been able to figure out how to play videos in the script player. I tried following the manual instructions but there still does not appear to be an option to play video.
Your welcome! I also can’t really decide, which video to choose most of the time ^^ So that random + chapter mode is very handy.
Really? What is the problem? The setup is very easy. Video and script has to have the same name and in the same folder. Connect your device with the script player, load the video (scripts loads automatically), press play and that should be it.
I just came across this and it’s pretty cool. One issue i’m having though is that I keep getting the same funscript file. I tried deleting the random.bat file and creating another one and I got the same funscript again.
Any idea on how I can get it to choose new values each time I double click the file?