Page 1 of 2

path of an opened dbf file.

Posted: Thu May 08, 2014 5:11 pm
by vierirom
Hi to everybody
Is there anybody who knows how to know the full path of an opened dbf file ?
I am looking for a function like this:
filepath := dbfpath(alias())

Thank you
Vieri

Re: path of an opened dbf file.

Posted: Thu May 08, 2014 5:35 pm
by Javier Tovar
Hola vierirom,

#define DirActual GetCurrentFolder() +"\"


Public ccDirData := DirActual + "Data\"


Espero te sirva

Saludos

Re: path of an opened dbf file.

Posted: Thu May 08, 2014 5:59 pm
by vierirom
Hola Javier
Thank you for your answer.
I need to find the actual path of an already opened dbf file.
If I write:
use mydbf alias mydbf new.
It tryes to open the dbf in set(_set_default)
If it doesn't find the file in (_default) it tryes to find it the path stream... (set(_set_path))
so.. if the file is opened I'm not sure where ACTUALLY the file has been found.
So I need the function to find the actual path of the already opend dbf file.

Thank you for your cooperation
Vieri

path of an opened dbf file - FULLPATH

Posted: Thu May 08, 2014 11:08 pm
by Pablo César
Hi Vieri,

you will find this usefull:

Code: Select all

#include "Dbinfo.ch"

use mydbf alias mydbf new
MsgDebug( dbInfo( DBI_FULLPATH ) )
Rgds

Re: path of an opened dbf file.

Posted: Fri May 09, 2014 7:01 am
by vierirom
Hi Pablo.

You are wonderful !!!
3 hard deep search days on the web !!! and nothing came out !!!

The function is exactly what I am looking for.

Thank you very much.

Vieri Romagnoli

Re: path of an opened dbf file.

Posted: Fri May 09, 2014 8:54 am
by Rathinagiri
That is so nice Pablo. Thanks a lot.

path of an opened dbf file.

Posted: Fri May 09, 2014 1:10 pm
by Pablo César
Good to know is usefull for you. Thanks guys.

Re: path of an opened dbf file.

Posted: Sat May 10, 2014 2:54 am
by Javier Tovar
Excelente Pablo César, muy bueno y bonito!

Saludos

path of an opened dbf file.

Posted: Sat May 10, 2014 2:55 am
by Pablo César
Gracias, Javier.

Re: path of an opened dbf file.

Posted: Tue Mar 27, 2018 1:05 pm
by dominique_devuyst
Hi everybody,

I also need to find the path of an already opened dbf file.
And I would like to use dbinfo() that I found very usefull.
So I do :
....bla bla
Filepath := dbInfo(DBI_FULLPATH)
.... bla bla
@ P_row,P_col PRINT "File Path : "+alltrim(Filepath) FONT cFont1 SIZE nFontSize1

But it only print the filename, not the full path!

Anyone know why?

Thank you,
Dominique