Invisible CDX files

Re: Invisible CDX files

Postby Enrico Maria Giordano » Sun Sep 09, 2018 6:51 am

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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Invisible CDX files

Postby James Bott » Sun Sep 09, 2018 5:16 pm

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: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Invisible CDX files

Postby James Bott » Sun Sep 09, 2018 7:06 pm

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 view
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
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Invisible CDX files

Postby Otto » Mon Sep 10, 2018 7:20 am

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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6312
Joined: Fri Oct 07, 2005 7:07 pm

Re: Invisible CDX files

Postby Antonio Linares » Mon Sep 10, 2018 7:22 am

Otto,

+1 for Total Commander :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42065
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Invisible CDX files

Postby Silvio.Falconi » Mon Sep 10, 2018 8:15 am

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Invisible CDX files

Postby James Bott » Mon Sep 10, 2018 2:41 pm

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests