Can an file alias/shortcut be cross platform?

There are many discussions of aliases and shortcuts on the forum, but both words are ambiguous so I am not sure they apply to my situation. I have a 10 Mb folder of a thousand little files that I use in several situations. On Mac, I can create an “alias” and it works fine, but when I use my Mac to compile for windows, it seems to want a “shortcut” instead.

I can detect the alias at windows runtime since it is not itself a folder, but I do not see how to tell windows what to do instead, without hard-coding the names of the referenced folders.

A Windows shortcut is the equivalent of a Unix (Mac/Linux) alias. Your code should work the same on each platform.

Thank you Tim. I seem to be able to get partially there on windows. I cannot get xojo to recognize a windows shortcut when I call it by name, but it seems to recognize it and resolve correctly if I index to it numerically with ChildAt.

Since I often have a mix of true folder names and shortcuts, sorting that out seems to be what in the old days we called SMOP, perhaps to be repeated on the Mac side.

How do you access the folderitem? Are you passing False for FollowAlias?

I am doing nothing out of the ordinary. My assumption has been that I write code that accesses a folder of files, it works, then, without any changes to the code, I substitute a shortcut/alias in the file system and it still works. My initial impression is that, if I accessed folder items by index, the same code would work both ways, but I don’t. I access by name.

This a not urgent for me and so I am just eliminating the aliases and storing the folders three times instead of once. But thanks to you, I do understand things better.

Since they have a .shortcut extension, try opening them with a text input stream. IIRC, the path is stored as text and you can just take that and create a new folderitem from it.