` Reading Directories (Jason S ) - 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: Reading Directories
2004-12-20 -- Jason S
 
MyQueue Queue, PRE(MYQ) FullPath string(2000) end AllFiles QUEUE(File:queue),PRE(FIL) !Inherit exact declaration of File:queue END LOC:Path string(2000) LOC:Counter LONG LOC:Inner LONG ! End of "Data Section" CODE ! Start of "Processed Code" ! [Priority 5000] MYQ:FullPath = 'D:\Program Files\' add(MyQueue) LOC:Counter = 0 loop LOC:Counter += 1 get(MyQueue, LOC:Counter) if errorcode() BREAK end LOC:Path = MYQ:FullPath free(AllFiles) DIRECTORY(AllFiles,clip(LOC:Path) & '*.*',ff_:DIRECTORY) LOC:Inner = 0 loop LOC:Inner += 1 get(AllFiles, LOC:Inner) if errorcode() BREAK end IF BAND(FIL:Attrib,ff_:DIRECTORY) AND FIL:ShortName <> '..' AND FIL:ShortName <> '.' MYQ:FullPath = clip(LOC:Path) & clip(FIL:name) & '\' add(MyQueue) end end end


Today is November 21, 2024, 8:35 am
This article has been viewed 35233 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: