ROWCOUNT()
Jump to navigation
Jump to search
Description
- Get the amount of rows contained in the result list for the FILES command
Syntax
- #handle ROWCOUNT()
Hints
- This can be used to resize an array that will hold the information returned by the FILES command
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