` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

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 May 6, 2024, 11:34 am
This article has been viewed 35114 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: