It's the use of the KILL statement.
This may be intentional to prevent you from trying to open and access files that could no longer exist any longer.
Best solution would probably be to read all those files into an array first, then process them after.
Code: (Select All)
a$ = _Files$("*.*")
Print 1, a$
t$ = "temp.tmp"
Open t$ For Output As #1
a$ = _Files$
Print 2, a$
Close
a$ = _Files$
Print 3, a$
Kill t$
a$ = _Files$
Print 4, a$
This may be intentional to prevent you from trying to open and access files that could no longer exist any longer.
Best solution would probably be to read all those files into an array first, then process them after.