Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease 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!
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, 6:46 am This article has been viewed 35232 times.
|
|