General information
Category:
Coding, syntax & commands
Title:
Checking for Table in a directory
I am trying to check for a table in a directory. I am using a xls sheet to create a fox pro table. What I am trying to do and what I have already done is as follows:
I have ftp a xls file into a folder in a directory.
Hey everyone,
Here is a scenario of my problem. If anyone has any thoughts, please let me know.
scenario:
I search the directory for an xls file for one that is present in the directory using the sys(2000, directory\*.xls).
I substring the *.xls file into several variables and use these variables to name a table I have already built.
Ex: variable = substring(*.xls, 1, 2)
I do this by copying the structure of a table I have already built and naming it using the variables I have substringed and append the xls sheet into it.
Ex: use established table
Copy Structure to ("directory\" +variable + variable + ".dbf")
Use ("directory\" +variable + variable + ".dbf")
append from (*.xls) type xls
All this works fine. What I cannot figure out is how to check the directory to see if ("directory\" +variable + variable + ".dbf") is built. I do not want to rebuild the table if the table is already out there.
I have tried to seek("directory\" +variable + variable + ".dbf")
If found()
append to it
else
the copy structure stuff.
This does not work.
Any suggestions would be appreciated. Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only