Problem with the FILES statement
May 13, 2021 5:12:50 GMT -5
Post by donnybowers on May 13, 2021 5:12:50 GMT -5
Here's my program:
Here's what it produces:
1 -
2 -
3 - [versions]
4 -
5 -
6 - checkbox.bas
7 -
8 - workingversion.xml
How do I get rid of the blank lines?
dim f$(500)
files #dir, "F:\RunBASICwin\projects\Faith_project\*"
numFiles=0
while #dir hasAnswer()
numFiles=numFiles+1
#dir nextFile$()
if #dir isdir() then
f$(numFiles)="[";#dir name$();"]"
end if
wend
files #dir, "F:\RunBASICwin\projects\checkbox_project\*"
while #dir hasAnswer()
numFiles=numFiles+1
#dir nextFile$()
if #dir isdir() then
else
f$(numFiles)=#dir name$()
end if
wend
for i=1 to numFiles
print str$(i);" - ";f$(i)
next i
Here's what it produces:
1 -
2 -
3 - [versions]
4 -
5 -
6 - checkbox.bas
7 -
8 - workingversion.xml
How do I get rid of the blank lines?