KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Creating a desktop alias
PRODUCT: 4D | VERSION: | PLATFORM: Win
Published On: October 25, 2002
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Product: 4D v6.7.x and 6.8.x

Here is a simple method that will create an alias to a given file path:

` Project Method: CreateDesktopAlias
` $1 - Path to the target file

C_BOOLEAN($Done)
C_TEXT($1;$targetPath;$Destop;$char)
C_LONGINT($i)
$targetPath:=$1
$i:=Length($targetPath)
Repeat
$char:=$targetPath[[$i]]
If ($char="\")
$Done:=True
Else
$i:=$i-1
End if
Until (($Done) | ($i<1))
$Destop:=System folder(Desktop Win)+Substring($targetPath;$i+1)
CREATE ALIAS($targetPath;$Destop)