
November 17th, 2004, 06:14 PM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Need Help Counting Files / Looping Through Them
Alright, here's what I want to do. I have 40 .wav files in the a directory called "soundfiles" within the home directory (also where the main .exe file is for the program). What I'm trying to do, is set up a loop that runs through each of these files, playing them one at a time in order, and when it has finished the last file, will know to stop and exit the program. Is there any easy way to do this, i.e. somehow creating a variable for the # of files in the directory at the start of the program? I also need to be able to display the file name that is being played, which I think I know how to do, but I'm still not sure. I'm stumped. Any help is appreciated! Thanks!
|