forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


For the people who need it... Recusive directory reading!

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code
View previous topic :: View next topic  
Author Message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Sun Jan 25, 2004 1:18 pm    Post subject: For the people who need it... Recusive directory reading! Reply with quote

I just made a quick program for searching specific types of files on the harddrive. I made it for my MP3-database program.

Code:
TITLE Searching
DIALOG CREATE,Searching,-1,0,250,50,NOTITLE
DIALOG ADD,GROUP,Group,0,4,242,46,Searching for MP3-files...
DIALOG ADD,TEXT,Path,20,12,225,,Loading directory structure...
DIALOG SHOW

%%Path = C:
LIST CREATE, 1
LIST FILELIST, 1, %%Path, *DHSR
%%TotalSubs = @COUNT(1)
%%CurrentSub = 0
REPEAT
  IF @GREATER(%%Totalsubs, 0)
    DIALOG SET, Path, @ITEM(1)
    LIST FILELIST, 1, @ITEM(1)\*.mp3
    LIST DELETE, 1
    %%CurrentSub = @SUCC(%%CurrentSub)
  END
UNTIL @EQUAL(%%CurrentSub, %%TotalSubs)
INFO @COUNT(1) MP3-files found!
LIST SAVEFILE, 1, @PATH(%0)\Filelist.txt
LIST CLOSE, 1
RUN @SHORTNAME(@PATH(%0)\Filelist.txt)


You can remove a few lines at the end of the program, but this is only for showing you the output!

Greetz,
Raymond
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 3 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group