Page 2 of 2

Re: Invisible CDX files

Posted: Sun Sep 09, 2018 6:51 am
by Enrico Maria Giordano
James Bott wrote:Enrico,

Yes, I already did that. In fact the program was already checking to see if each index existed, then creating it if it didn't (see one of my previous messages above).

Just now I did create another test program as you suggested, and it shows true for each of the five indexes, yet only two of them are visible with Windows Explorer (or the DOS prompt).


Are you sure that SET DEFAULT and SET PATH are not pointing elsewhere? From the doc:

The File() function is used to check if a file exists that matches the file specification <cFileSpec>. When <cFileSpec> does not contain directory information, the function searches directories in the following order:
1. the current directory.

2. the directory set with SET DEFAULT.

3. the directories listed in the SET PATH setting.


EMG

Re: Invisible CDX files

Posted: Sun Sep 09, 2018 5:16 pm
by James Bott
Otto,

I have not yet tried Total Commander. I am using Win 10 File Explorer.

Here are which indexes are visible and invisible:

Visible CDSs:
Document.cdx
Work.cdx

Invisible CDXs:
Project.cdx
Type.cdx
Group.cdx

Re: Invisible CDX files

Posted: Sun Sep 09, 2018 7:06 pm
by James Bott
Success at last!
---------------

Everyone,

The DBFs and CDXs are all supposed to be in the current directory. And they are on my computer but not on the work computer.

With both settings "set to show hidden files" and "show hidden system files" turned on, I started a complete C drive search for one of the missing indexes. It searched about an hour without finding the index. It still wasn't done, but I stopped it. Of course, the search is also looking inside each file so this could take a very long time.

I had an idea. I tried renaming one of the visible indexes to the name of one of the invisible indexes (using File Explorer) and it worked. Normally, it would have put up a message that the filename already existed. This seems indicate that the invisible cdx is not in the current directory. Makes sense.

I didn't think there was a way to search the entire C drive for a filename without searching inside each file also. However, I did a internet search and found a video which talked about how to do it. The presenter was talking so fast it was hard to write down the syntax, but I finally got it.

Just use the search in File Explorer. To search just for the filename (group.cdx in this case) type:

ext: cdx filename: group

The result came up in less than a minute:

c:\Users\[username]\AppData\Local\VirtualStore\Program Files\WorkLog

WorkLog is the name of the directory where the app resides. I immediately recognized this because of the hint that Stefano gave (thanks Stefano). I have never come across this before.

Still I have to wonder why 2 indexes were created in the current directory, then Windows decided to place the other 3 indexes somewhere else. I have never had this happen before.

I added the SET DEFAULT to the app as per Enrico's suggestion. Thanks Enrico. However it didn't make any difference. Finally, I deleted the 3 indexes in the remote location and reindexed and all five showed up in the current directory! Success at last.

Code: Select all | Expand

set default to (cFilePath( GetModuleFileName( GetInstance() ) ))


Thanks to everyone that offered ideas. Very helpful.

Regards,
James

Re: Invisible CDX files

Posted: Mon Sep 10, 2018 7:20 am
by Otto
Dear James,

please try TotalCommander. For me it is the most productive tool I know.

Image

Best regards
Otto

Re: Invisible CDX files

Posted: Mon Sep 10, 2018 7:22 am
by Antonio Linares
Otto,

+1 for Total Commander :-)

Re: Invisible CDX files

Posted: Mon Sep 10, 2018 8:15 am
by Silvio.Falconi
last year I had a similar problem and I asked also on the forum

because when I installed my application on a WINDOWS SEVEN disk or WINDOWS 10

I could only view my exe and some files while the archives had disappeared in some distant folder in "c: \ Users \" silvio \ AppData \ Local ... "

and therefore I could not control the dbf because I did not find them physically.

So I had also asked for a command to force the PAth of creation and saving dbf / cdx.

a Question ...the command "set default to (cFilePath (GetModuleFileName (GetInstance ())))"

is correct or works sometimes ?

because I have not seen any progress here. Thank you

Re: Invisible CDX files

Posted: Mon Sep 10, 2018 2:41 pm
by James Bott
Otto and Antonio,

I will definitely take a look at Total Commander. I remember using it many years ago.

Silvio,

>a Question ...the command "set default to (cFilePath (GetModuleFileName (GetInstance ())))"

>is correct or works sometimes ?

Well, it worked for me. It can't hurt. I have already made myself a note to always include it in any app.

Note that this syntax is only if you want to save the files in the current directory (the one that the EXE resides in). You can modify it if you want to use a subdirectory like \data, or you want to place them anywhere else.

James