Page 2 of 2

Re: path of an opened dbf file.

Posted: Tue Mar 27, 2018 4:45 pm
by serge_girard
Dominique,

This code is OK:

Code: Select all

use some_file
DirActual := GetCurrentFolder() + "\"
Filepath  := dbInfo(DBI_FULLPATH)
msginfo("File fullpath: " + DirActual + Filepath  )
 


But when you do:

Code: Select all

use c:\folder\some_file
DirActual := GetCurrentFolder() + "\"
Filepath  := dbInfo(DBI_FULLPATH)
msginfo("File fullpath: " + DirActual + Filepath  )
 


It will give twice pathnames!

Serge

Re: path of an opened dbf file.

Posted: Wed Mar 28, 2018 10:19 am
by dominique_devuyst
Hello Serge,

YES! It works.
But the currentfolder may not be the same as the file.
I will do like that :

Code: Select all

Actualpath := GetCurrentFolder() + "\"
FileName := Actualpath+"some_file"
use (FileName)
/*
.....
*/
Filepath  := dbInfo(DBI_FULLPATH)
So I'm sure it's the right one.

Thank you for your help,
Dominique

Re: path of an opened dbf file.

Posted: Wed Mar 28, 2018 10:23 am
by serge_girard
Great !

Serge