Invisible CDX files

User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Invisible CDX files

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Invisible CDX files

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Invisible CDX files

Post 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

set default to (cFilePath( GetModuleFileName( GetInstance() ) ))
Thanks to everyone that offered ideas. Very helpful.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Invisible CDX files

Post by Otto »

Dear James,

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

Image

Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Invisible CDX files

Post by Antonio Linares »

Otto,

+1 for Total Commander :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Invisible CDX files

Post 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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Invisible CDX files

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Post Reply