repeated use of Files object
Oct 26, 2007 19:51:04 GMT -5
Post by colinmac on Oct 26, 2007 19:51:04 GMT -5
Is there any limit on the number of times a files object can be used? Alternatively, is there a way to close one prior to re-use?
The code below attempts to read details of project files, using the #rbbas files object in a loop, once for each project directory. whatever I do I cannot get beyond seven files, getting the error message
Any help would be appreciated.
Colin
The code below attempts to read details of project files, using the #rbbas files object in a loop, once for each project directory. whatever I do I cannot get beyond seven files, getting the error message
Runtime Error: print #rbbas name$(); " last used " ; #rbbas date$(); " at "; #rbbas time$()
SubscriptOutOfBoundsErrorAny help would be appreciated.
' file finder
files #rbdir, "c:\rbp\*"
for x = 1 to #rbdir rowcount()
#rbdir nextfile$()
if #rbdir isdir() then
dir$ = #rbdir name$()
bas$ = left$(dir,ドル len(dir$)-8 )
basfile$ = dir$ +"\" + bas$ + ".bas"
files #rbbas, basfile$
#rbbas nextfile$()
print #rbbas name$(); " last used " ; #rbbas date$(); " at "; #rbbas time$()
end if
next x
waitColin