>I need some advice on this one.
>
>Among 20 or so open tables, there is a table calld INV.DBF with a few IDX and one CDX files that are open with it. The CDX file is called INV_.CDX (not the default CDX).
(after having read the whole thread so far)
Depends on what you're doing with that index. If it's a permanent index, then just re-create all of its tags in the structural .cdx and kill inv_.cdx completely. If you need the tags all the time, they better be updated automatically.
If the index is temporary, created when needed, then you'll run into problems when two workstations try to create the same index. Worse, you may find yourself using an index which is desperately outdated.
Assuming that the s: drive is where the app runs, it would be better to have temp indexes on the temp drive/dir, with temp names:
procedure tempname(tcExt)
lcDir=getenv("temp")
lcExt=evl(tcExt, "tmp")
lcFile=forceext(sys(2015),lcExt)
lcFullPath=fullpath(forcepath(lcfile, lcdir))
return lcFullPath
So create this index like this:
lcCdx=tempname("cdx")
index on ... tag ... of (lcCdx)
and later, when you don't need the index anymore,
erase (lcCdx)
i.e. you better save the filename somewhere so you can clean up when your app exits. Simpler way to achieve that is to use your own subdirectory and simply delete everything you see there when you exit. The Erase command will erase what it can, and it won't report any error if it can't erase something.