PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
fCreateLink (Function)
In french: fCréeLien
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
// Create a symbolic link (lnk file)
fCreateLink("C:\temp\readme.txt", "C:\readme.lnk", fLinkSymbolic)

// Create a physical link
fCreateLink("C:\temp\readme.txt", "C:\readme.lnk", 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 find out the error details, use ErrorInfo.
<Pointed file>: Character string (with quotes)
Full path of the file toward which the link will point.
<Link destination>: Character string (with quotes)
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.
Caution: <Pointed file> and <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 (with quotes)
Versions 19 and later
Command line of the link. This parameter is taken into account when creating a symbolic link only.
New in version 19
Command line of the link. This parameter is taken into account when creating a symbolic link only.
Command line of the link. This parameter is taken into account when creating a symbolic link only.
<Working directory>: Optional character string (with quotes)
Versions 19 and later
Working directory of the link. This parameter is taken into account when creating a symbolic link only.
New in version 19
Working directory of the link. This parameter is taken into account when creating a symbolic link only.
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 : wd250std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment