I am trying to read in the filenames of all the excel files in a particular directory and then place those names into a temporary cursor called cPreImport. The problem is that FoxPro puts the filenames from the DIR command into two columns and I can't get FoxPro to read the second column of file names in the text file it created in the DIR command.
Any ideas how to make this work?
Thanks
Any ideas how to make this work?
Thanks
Code:
SET SAFETY OFF
DIR LIKE d:\temp\fnfbatch\*.XLS TO FILE &lc_importfile_savename
SET SAFETY ON
*****************************************************
* Create temporary cursor to hold file names
*****************************************************
CREATE CURSOR cPreImport (Name c(13))
SELECT cPreImport
APPEND FROM &lc_importfile_savename DELIMITED WITH BLANK