|Thanks for the quick response nbrane! ^_^|
I tried the new build from #11 and couple of things happen:
I get the prompt for No more unplayed files, reset all files? [Y,N]
If I press Y or N, it will prompt me the same question forever regardless if I press yes or no, and the first output contains nothing except for #EXTM3U.
If I close the window, and try the 2nd time, it outputs the 2nd playlist, but if I press Y or N, the 2nd playlist will disappear, it seems to be deleted. I checked before it got deleted and still contains nothing except for #EXTM3U.
nbrane, I found something very strange, can you explain this to me?
When I run your original modified script here:
SET extensionList=avi mp4 mkv mpg
SET /A cnt+=1
IF EXIST %cnt%.m3u GOTO Loop
FOR /D %%a IN (c:\testing\*) DO CALL :PickFile "%%a"
FOR %%b IN (%extensionList%) DO CALL SET searchList=%%searchList%% "%~1\*.%%b"
:: modification one: count only files with archive attribute turned ON
FOR /F %%b IN ('2^>NUL DIR /A-D-H-SA %searchList% ^| FIND "File(s)"') DO SET limit=%%b
SET /A fileNum=(%random% %% limit) + 1
:: modification 2: include only files with archive attribute turned ON
FOR /F "tokens=2 delims=:" %%b IN ('2^>NUL DIR /A-D-H-SA/B %searchList% ^| FINDSTR /N ".*" ^| FINDSTR "^%fileNum%:"') DO ^
CALL :AddList %1 "%%b" >>%cnt%.m3u
:: modification three: "disable" or otherwise "switch off" this file from future inclusions
@ATTRIB -A %~f1\%2
and run it 10 times, it outputs 10 video files all randomly once.
Then when I run the #11 build, and this time press Y for [Y,N] it deletes all the playlists, so then I run the modified one I pasted above again, it plays all 10 files all randomly and without repeating!
I don't know what happened during that #11 build, does it basically turn all the attrib back on again?
So this time, I tried to test it out on my external drive, which contains 27 shows with episodes ranging from 24 episodes to over 100+. When I run the modified script posted above, it runs beautifully, all different episodes each playlist, but when I run the #11 build, and I press Y for the [Y,N] prompt, it seems to remove the last 2 shows of the list. Not that I'm complaining, because I can just run the modified build mentioned earlier and that does the trick.
It's just I'm thinking that after the 24th playlist, I should run the #11 build so that the show that contains only 24 episodes gets reset back and then I just run the modified one from above?
I hope that didn't sound too confusing LOL.
nbrane this is coming out beautifully I'm loving it more and more~ ^_^