I have a folder that I sync with online services such as Dropbox, that I sync to other computers with different operating systems. Part of my file/folder organization in this folder uses symlinks/aliases (my home computer is a Mac). When it syncs the folder to a Windows computer, unfortunately symlinks and aliases are not recognized, but shortcuts are.
Is there a way to create a symlink/shortcut once on a Mac or Windows with cross-platform compatibility? Otherwise I'll have to create two links per file, once for Mac/Linux and one for Windows.
NOTE: The purpose of this folder, because I know someone will ask, is to organize and store a lot of files in a hierarchy of folders. Occasionally, a file or folder seems to fit into two or more places, hence the symlink. This is a very common practice on Mac/Linux.
Best Answer
According to this How-to-geek post, you can use
mklink
from cmd (Windows Vista - 10) to make symlinks that also work in linux. The guide also has a way to install an tool that can make linking easier (by adding it to the right-click menu.)The command-line syntax is:
Where prefix can be:
An example that I just did:
Which makes a link in
14Winter
calledcs355
to thecs355
inclasses
After creating the link on Windows, the link worked on my Linux box, too. I have not tried Mac. If you find it doesn't work for mac, let me know.
EDIT: Old answer
Here is a dumb, but possibly useful solution: You could write a little python script that is an agnostic link (Code found here)
This will, of course, always open a new window. Not a great solution, but it may be all you get. (Keep praying that one day windows will be Linux based... or just die.)