Joined: 24 Apr 2002
|Posted: Sun Jan 25, 2004 1:18 pm Post subject: For the people who need it... Recusive directory reading!
|I just made a quick program for searching specific types of files on the harddrive. I made it for my MP3-database program.
DIALOG ADD,GROUP,Group,0,4,242,46,Searching for MP3-files...
DIALOG ADD,TEXT,Path,20,12,225,,Loading directory structure...
%%Path = C:
LIST CREATE, 1
LIST FILELIST, 1, %%Path, *DHSR
%%TotalSubs = @COUNT(1)
%%CurrentSub = 0
IF @GREATER(%%Totalsubs, 0)
DIALOG SET, Path, @ITEM(1)
LIST FILELIST, 1, @ITEM(1)\*.mp3
LIST DELETE, 1
%%CurrentSub = @SUCC(%%CurrentSub)
UNTIL @EQUAL(%%CurrentSub, %%TotalSubs)
INFO @COUNT(1) MP3-files found!
LIST SAVEFILE, 1, @PATH(%0)\Filelist.txt
LIST CLOSE, 1
You can remove a few lines at the end of the program, but this is only for showing you the output!