ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / External file functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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
// 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 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.
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.
Linux Only the owner of the file can create a symbolic link.
PHP To create a symbolic link, Windows Vista or later must be used.
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.
LinuxPHP This parameter is not available.
<Working directory>: Optional character string
Working directory of the link. This parameter is taken into account when creating a symbolic link only.
LinuxPHP This parameter is not available.
Remarks
  • Windows In Windows, the links can only be created on disks formatted in NTFS.
  • PHP For fCreateLink to have an effect, you must run the PHP site in IIS with elevated rights
  • PHP If the system used corresponds to Windows Vista or later, you must use a PHP server later than version 5.3.
Component: wd290std.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/24/2022

Send a report | Local help