mories
asked on
converting filename to truename... ??
Hello people,
if have a string which is a filename on drive h: for ex
strFilename := 'h:\ab\test.doc'
i'm on a network and i want to convert strFileName to a truename like '\\servername\sharename'
i use Windows.WNetGetConnection( PChar('h:' ),PChar(st rNetPath), dwMaxNetPa thLen)
to get the truename of h:
but how do i put these two string together ???
'\\servername\share'
'h:\ab\test.doc'
to become
'\\servername\share\ab\tes t.doc'
i have tried some string operations. but i cannot get this to work.
if have a string which is a filename on drive h: for ex
strFilename := 'h:\ab\test.doc'
i'm on a network and i want to convert strFileName to a truename like '\\servername\sharename'
i use Windows.WNetGetConnection(
to get the truename of h:
but how do i put these two string together ???
'\\servername\share'
'h:\ab\test.doc'
to become
'\\servername\share\ab\tes
i have tried some string operations. but i cannot get this to work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Let
x := '\\servername\share';
y := 'h:\ab\test.doc' ;
The code for concatenating them is
fullname := x + System.Delete(y,1,2); //delete drive letter from y
Regards,
Igor