Runtime environment: XP SP2 CMD.
A friend asked me this question. I thought it was pretty interesting, but my skills are limited, so I can't write a batch file like this.
The problem is like this:
Conditions: the names obtained must be random, not too regular (they can't be completely ordered by size, name, creation date, etc.), and there must also be a quantity limit (take 100 files as an example). If it's sorting by size or name and so on, I can write that myself. What stumped me is the random part and the 100 files part here.
In an MP3 directory, I have N MP3 files (basically all named in Chinese). Now I want to use a batch file to randomly generate an M3U playlist, and then call WMP to play it, so as to achieve WMP random playback.
I can write all the other parts, it's just this one step of randomly obtaining the filenames that I can't write.
Not sure if anyone on the forum is interested. Please post some code if so.
[ Last edited by voiL on 2006-7-26 at 19:37 ]
A friend asked me this question. I thought it was pretty interesting, but my skills are limited, so I can't write a batch file like this.
The problem is like this:
Conditions: the names obtained must be random, not too regular (they can't be completely ordered by size, name, creation date, etc.), and there must also be a quantity limit (take 100 files as an example). If it's sorting by size or name and so on, I can write that myself. What stumped me is the random part and the 100 files part here.
In an MP3 directory, I have N MP3 files (basically all named in Chinese). Now I want to use a batch file to randomly generate an M3U playlist, and then call WMP to play it, so as to achieve WMP random playback.
I can write all the other parts, it's just this one step of randomly obtaining the filenames that I can't write.
Not sure if anyone on the forum is interested. Please post some code if so.
[ Last edited by voiL on 2006-7-26 at 19:37 ]

DigestI