Well there are a lot of things wrong in this code. I assume you're using DB 1.x?
- Variables in DB are not global (in DBpro they can be global)
- so you have Numb$ = "000" and then later Numb$ = "Numb$+1". So the variable Numb$ contains the string "Numb$+1".
- Find First results can be accessed by Get File Name$(). By the way in your case file exist() would be better.
- the Variable Title$ in you function contains nothing at all.
I will write you a snippet but need answers to the following questions:
What DB version do you use?
Are there going to be more files than Data_001.txt? For example Data_029.txt, Data_143.txt and so on?
Ogres have layers.