I test before if the original item exists and if an item with the name doesn’t exist in the Destination folder. Then I assume all is ok.
Dim MyOrgItem as FolderItem -- I want an Alias which point to this file
Dim MyDestFolder as FolderItem -- I want my Alias to be in that folder
Dim TextCdeShell, NameAlias as String
Dim CdeShell as New Shell
If I want to give a different name I do
NameAlias = "/TotoNewName"
If I want to keep the same name
NameAlias = ""
I know how to do with Mac OS and I can test as it is my System :
TextCdeShell = "ln -s " + MyOrgItem.ShellPath + " " + MyDestFolder.ShellPath + NameAlias
On Linux, I don’t know but I suppose it’s the same.
On Windows, I search on the web and as far as I understood :
If MyOrgItem.Directory Then
TextCdeShell = "mklink /D " + MyDestFolder.ShellPath + NameAlias + " " + MyOrgItem.ShellPath
TextCdeShell = "mklink " + MyDestFolder.ShellPath + NameAlias + " " + MyOrgItem.ShellPath