Board index » delphi » Getting HDD-Path by Alias

Getting HDD-Path by Alias

Hi there,

a little problem:

How am I able to get the exact Drive-Path by a known BDE-Alias (Paradox)?

Any suggestions?

Bye,
        Christian Hartmann

The killer B's...Braves, Beer and Borg

 

Re:Getting HDD-Path by Alias


Quote
Christian Hartmann wrote:

> Hi there,

> a little problem:

> How am I able to get the exact Drive-Path by a known BDE-Alias (Paradox)?

> Any suggestions?

> Bye,
>         Christian Hartmann

> The killer B's...Braves, Beer and Borg

Re:Getting HDD-Path by Alias


Quote
Christian Hartmann wrote:

> Hi there,

> a little problem:

> How am I able to get the exact Drive-Path by a known BDE-Alias (Paradox)?

> Any suggestions?

> Bye,
>         Christian Hartmann

> The killer B's...Braves, Beer and Borg

Hi Christian,

If you want to get the path specified in an alias try this.

function TForm1.GetAliasPath(AliasName : String):string;
var lst : TStrings;
begin
     lst := TStringlist.create;
     Session.GetAliasParams(AliasName, lst);
     result := copy(lst.strings[0], 6, length(lst.strings[0]));
     lst.free;
end;

This is how I extract the path for an alias.

Try it out.

Cheers  Darren Olm
        d...@ozemail.com.au

Other Threads