Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import and reading from batch files
Message
From
27/09/2000 10:33:59
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, United States
 
 
To
27/09/2000 04:18:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00421332
Message ID:
00421455
Views:
20
Hi Siva,

Try something like this:

*-- find out where the spread sheets we need to track are located
ThisForm.cSheetDir = GETDIR("f:\private\sheets\vs","Stock Sheets?")

*-- Create an array of all the spreadsheets in the selected directory
lcName = ThisForm.cSheetDir+ "*.xls"
This.nTotalSheets = ADIR(laDir, lcName)

DIMENSION laList[This.nTotalSheets] && dimension the list array

FOR lnCnt = 1 to This.nTotalSheets
lcFile = laDir[lnCnt,1]
APPEND FROM &lcFile CVS
ENDFOR

You'll have to play with this to get it to work the way you need it to.

HTH,
Jacci


>Hi everyone,
> I am trying to read records from a batch of files located in a particular dir. I am able to get the dir name from the command getdir(). However, I would like to know the syntax(list of commands) that would enable me to open all the files that are situated in this dir and input them to a vfp table. The files are in comma seperated format. Any help is greatly appreciated. Thanks in advance.
>Regards,
> Siva
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform