|
Post by richardbaggett on Feb 10, 2013 18:13:46 GMT -5
I'm using the following construct to loop through some files in a directory. It works just fine, but keeps all the files matching the wildcard OPEN, so I can't run my backup routine unless I close the runbasic server. How can I close the accessor or otherwise release the files? sub totalVends for idx = 0 to 20 vi$(1,idx) = "" next files #vi, "c:\rbp101\data\*.rcp" while #vi hasAnswer() #vi nextFile$() t$ = "c:\rbp101\data\" + #vi NAME$() open t$ for input as #vdt while not(eof(#vdt)) input#vdt, qty$,des$,prc$,ext$,vnd$ idx = 0 while idx < 21 if vi$(0,idx) = vnd$ then exit while idx = idx + 1 wend ttl = val(right$(ext$,len(vnd$)-1)) ttl = ttl + val(right$(vi$(1,idx),len(vi$(1,idx))-1)) vi$(1,idx) = "$"+ using("####.##",ttl) wend wend #vi RESET() end sub
|
|
|
Post by StefanPendl on Feb 12, 2013 16:35:52 GMT -5
I only see open t$ for input as #vdt, but there is no close #vbt
|
|
|
Post by richardbaggett on Feb 14, 2013 16:37:36 GMT -5
Thanks. Sometimes I just can't see the obvious....
|
|