General information
Category:
Coding, syntax & commands
>Program Error -
>The name dirtxt is already used for another object. Please choose a different name.
>
>I want to know why I get this error.
>
>Here is my code:
>* I am doing a DIR TO command and making the result into a .DBF file.
>* Thus, taking a list of files in a directory and putting them in a table.
>CD \MYDIR\MYFILES
>DIR TO \MYDIR\MYFILES\DIR.TXT
>
>IF FILE('\MYDIR\MYFILES\DIRTXT.DBF')
> REMOVE TABLE dirtxt DELETE
>ENDIF
>
>CREATE TABLE dirtxt (textline c(80)) && THIS IS WHERE I GET THE ERROR!
>...
>...
>...
>* Then I take the table and select it and read it and process the filenames in the DIRTXT table that I create above.
>
>I don't use the name for another object as far as I can tell. Any ideas? THANKS!
You might want to do a disp status before the create table to see if DirTxt is a variable in use or something...
I ran your code snippet and it ran fine...
One question I have is would ADIR() be a bit faster, and also more multi-userish?
BOb
Previous
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