>Borislav gave you the code.
>
>Keep in mind that this will not guarantee the file is not corrupt. It will simply tell you if it can be opened.
That is exactly what i wanted it to do - it enables me to spot the corrupt tables and replace them from a backup
Thanks for your help
>
>
>>This is my code - it opens the first database and then errors trying to get the second with Funcion argument value type or count is invalid - I must be missing something very obvious
>>
>>CLEAR
>>CLEAR ALL
>>SET EXACT ON
>>SET TALK off
>>SET DEFAULT TO c:\global
>>PUBLIC dbfs,cta
>>DIMENSION dbfs(1000)
>>DIMENSION gadatabase(1000)
>>gadatabase=""
>>
>>
>>gnDbcnumber = ADIR(gaDatabase, '*.DBF') && Create array
>>FOR nCount = 1 TO gnDbcnumber && Loop for number of databases
>>dbfs(ncount)=gadatabase(ncount,1)
>>ENDFOR
>>
>>
>>STORE ncount TO cta
>>
>>DIMENSION dbfs(cta)
>>
>>
>>FOR xxxx=1 TO cta
>>STORE ALLTRIM(dbfs,xxxx) TO tablex
>>tablex=ALLTRIM(tablex)
>>USE &tablex IN 0 SHARED
>>next
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing