Commands & Syntax > Commands > File Mainpulation >

www.perfectkeyboard.com

 

SHORTCUT - < file_shortcut >() ... [Pro]

 

File SHORTCUT
<file_shortcut>("Shortcut file","File path","Parameters","Description","Icon file","Icon index")
Available in: Professional edition

This command creates a shortcut file (link - .lnk file) to a file or folder.

 

#

Parameter name

Parameter description

1

Shortcut file

Full path to the newly created shortcut file (e.g., "c:\mydocuments\shortcut.lnk") or just a shortcut file name - in such case the shortcut file will be created in the same folder where macro file is located).

2

File path

Full path to the file or folder the shortcut is created for. If just file or folder name is provided then it is expected the file or folder is located in the same folder where macro file is located).

3

Parameters

Parameters passed to the file when the shortcut is open. This typically applies to executables.

4

Description

Description of the shortcut.

5

Icon file

Full path to the icon file. If just the icon file name is provided then it is expected the file is located in the same folder where macro file is located).

6

Icon index

Index of the icon within the icon file (if the file contains multiple icons).

 

Example (Macro Steps):

 

1

<#> <#> This example shows how to create a shortcut file (.lnk) to other file or folder

2

File SHORTCUT "ShortcutToNotesDoc.lnk" to "c:\my documents\notes.doc" (Parameters=)

Example (Plain Text):

 

<#> This example shows how to create a shortcut file (.lnk) to other file or folder

<file_shortcut>("ShortcutToNotesDoc.lnk","c:\my documents\notes.doc","","Notes document","","0")