ISDIR()
Jump to navigation
Jump to search
Description
- Check if the current row from the FILES command contains a directory
Syntax
- #handle ISDIR()
Hints
- This function allows you to distinguish between files and folders
Example
List folders before files:
files #dir, DefaultDir$
dim f$(#dir rowcount())
numFiles = 0
while #dir hasAnswer()
#dir nextFile$()
if #dir isdir() then
numFiles = numFiles + 1
f$(numFiles) = "["; #dir name$(); "]"
end if
wend
#dir reset()
while #dir hasAnswer()
#dir nextFile$()
if not(#dir isdir()) then
numFiles = numFiles + 1
f$(numFiles) = #dir name$()
end if
wend
for i = 1 to numFiles
print using("###", i); " - "; f$(i)
next
end
Useful Procedures
' Place a useful function or sub using this keyword here