Board index » delphi » Get the full path of a file

Get the full path of a file

Is there any method to get the full, qualified path name of a given
file, instrad of using, GetFile* functions? I'd found that these
functions work ONLY if you give them a FULL path, or just the filename
itself, but don't work if you issue something like ..\DATA\STUFF.DBF.

TIA

Gary
-------------------------------------------------------
Haydn is the father of the symphonies.
Mozart is the son of the symphonies.
Beethoven is the god of the symphonies.
Bach is the Creator of all!
-------------------------------------------------------
*** Please remove NO_SPAM_TO_ in the email to reply ***

 

Re:Get the full path of a file


Use the ExpandFileName function.

Gary Tse <NO_SPAM_TO_garyk...@hknet.com> skrev i en
nyhedsmeddelelse:378BF076.4A5EC...@hknet.com...

Quote
> Is there any method to get the full, qualified path name of a given
> file, instrad of using, GetFile* functions? I'd found that these

Re:Get the full path of a file


Gary,

Application.ExeName  gives the complete name as a string;
eg:   'c:\MyProgs\Delphi 3\Prog1.exe'.

Alfred.

Gary Tse heeft geschreven in bericht <378BF076.4A5EC...@hknet.com>...

Quote
>Is there any method to get the full, qualified path name of a given
>file, instrad of using, GetFile* functions? I'd found that these
>functions work ONLY if you give them a FULL path, or just the filename
>itself, but don't work if you issue something like ..\DATA\STUFF.DBF.

>TIA

>Gary
>-------------------------------------------------------
>Haydn is the father of the symphonies.
>Mozart is the son of the symphonies.
>Beethoven is the god of the symphonies.
>Bach is the Creator of all!
>-------------------------------------------------------
>*** Please remove NO_SPAM_TO_ in the email to reply ***

Other Threads