ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Creates a link on a file at the specified location. This link can be:
  • a symbolic link (lnk file).
  • a physical link. This link may (or may not) be named like the source file. The physical link is used to make the same file appear at different locations.
Remarks:
  • To delete a symbolic or physical link, use fDelete.
  • To create a shortcut on the Windows desktop, in the "Start" menu of Windows or in a specific directory, use CreateShortcut.
Example
// Création d'un lien symbolique (fichier lnk)
fCreateLink("C:\temp\lisezmoi.txt", "C:\lisezmoi.lnk", fLinkSymbolic)

// Création d'un lien physique
fCreateLink("C:\temp\lisezmoi.txt", "C:\lisezmoi.doc", fLinkPhysical)
Syntax
<Result> = fCreateLink(<Pointed file> , <Link destination> , <Type of link> [, <Command line> [, <Working directory>]])
<Result>: Boolean
  • True if the link was created,
  • False otherwise. To get more details on the error, use ErrorInfo.
<Pointed file>: Character string
Full path of the file toward which the link will point.
<Link destination>: Character string
Path and name of the file corresponding to the link to create. The extension of the link must be specified.
<Type of link>: Integer constant
Type of link to create:
fLinkPhysicalCreate a physical link.
A physical link is a file that can be accessed via several paths. The file deletion can be performed only when all physical links have been deleted.
Warning: The <Pointed File> and the <Link Destination> must be on the same disk.
fLinkSymbolicCreate a symbolic link.
A symbolic link is a "pointer" to a file. The deletion of the symbolic link does not affect the pointed file. The deletion of the pointed file makes the symbolic link invalid.
Windows In Windows 10, to create a symbolic link, the user must have administrator privileges on the computer.
<Command line>: Optional character string
Command line of the link. This parameter is taken into account when creating a symbolic link only.
<Working directory>: Optional character string
Working directory of the link. This parameter is taken into account when creating a symbolic link only.
Remarks
  • Windows In Windows, the links can only be created on disks formatted in NTFS.
Component: wd300std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help