` Procedure to get disk directory tree (Chris Behling ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Procedure to get disk directory tree
1999-05-13 -- Chris Behling
 
Here's the source procedure I use -- should work fine!! You would probably define a que to keep all the HoldDir descriptions in -- could be Global or passed into the procedure. RecursiveDir(STRING WhichDir) Local Data Embed: FileQue QUEUE name STRING(13) date LONG time LONG size LONG attrib BYTE !A bitmap, the same as the attributes EQUATEs END HoldDir STRING(100) Processed Code Embed: ! recursive routine that gets all directories ! get all of the directories DIRECTORY(FileQue,CLIP(WhichDir) & '*.*',ff_:DIRECTORY) !Get all files and directories SORT(FileQue,+FileQue.name) Recs# = RECORDS(FileQue) LOOP a# = 1 TO Recs# GET(FileQue,a#) IF BAND(FileQue.attrib,ff_:DIRECTORY) AND FileQue.name <> '..' AND FileQue.name <> '.' ! do your stuff here ! ! ! call dir routine again HoldDir = CLIP(WhichDir) & CLIP(FileQue.name) & '\' RecursiveDir(HoldDir) END END


Today is November 21, 2024, 3:54 am
This article has been viewed 35319 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: