>Naomi
>
>About your code
>
>I used the code to append from .DBFs of former folder
>and it worked fine
>
>But in another folder which has less tables, a message appears after
>processing some tables:
>
>"Subscript is outside defined range"
>
>Do you think that's because the folder has less .dbf files,
>and have to do with the number of tables inside the array ?
Here's a similar approach that won't try to append to/from files that don't exist
lcAppendIntoPath = ADDBS(myIntoPath)
lcAppendFromPath = ADDBS(myFromPath)
lnNumTables = ADIR(aTables,lcAppendFromPath+"*.dbf")
SELECT 0
FOR I = 1 TO lnNumTables
TRY
USE (lcAppendIntoPath+aTables[i,1] EXCLUSIVE
ZAP
APPEND FROM (lcAppendFromPath+aTables[I,1])
CATCH
=MESSAGEBOX("Cannot open "+lcAppendIntoPath+aTables[I,1])
ENDTRY
ENDFOR
USE