>>>>>You must use the specific file name. You can use ADIR to get a list of files then loop though the array.
>>>>>
>>>>>
>>>>>>In my directory j:\interlinkhayes are a number of csv files all of the same format delimited with commas
>>>>>>
>>>>>>If I append just 1 file as follows APPEND FROM j:\interlinkhayes\INT12345.csv DELIMITED WITH CHAR , I have no problems
>>>>>>
>>>>>>But if I try APPEND FROM j:\interlinkhayes\INT*.csv DELIMITED WITH CHAR , I get errors
>>>>>>
>>>>>>What is the simplest code for appending multiple files with a skeleton INT*.CSV
>>>>
>>>>Thanks
>>>>
>>>>Can you show me the code to get a list of all the files
>>>>
>>>>Much appreciated
>>>
>>>
>>>lcDir = ' j:\interlinkhayes\'
>>>lcSkeleton = 'int*.csv'
>>>lnFiles = adir(laFiles, lcDir + lcSkeleton)
>>>for lnX = 1 to lnFiles
>>> append from (lcDir + laFiles(lnX,1) ...
>>>Endfor
>>
>>
>>lnfiles is 0
>
>If you have too many files in the folder, or adir() isn't "allowed", try this code which should always work.
>
>
>alcDir = 'j:\interlinkhayes\'
>lcSkeleton = 'int*.csv'
>llFirst = .T.
>do while .t.
> if llFirst
> lcFilename = sys(2000, lcDir + lcSkeleton)
> else
> lcFilename = sys(2000, lcDir + lcSkeleton,1)
> endif
> if empty(lcFilename)
> exit
> endif
> llFirst = .F.
> Wait window "Processing " + lcFilename nowait
> append from (lcDir + lcFilename) delimited with character ,
>enddo
>wait clear
Thanks
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing