tdannecy@gmail.com

What's the right file shortcut to use in SharePoint, Teams, and OneDrive with Windows and MacOS?

#OneDrive #Windows #SharePoint #Teams #Microsoft #MacOS

Earlier today, a user was looking for recommendations for which file shortcut to use that would be cross-platform compatible. The user wanted everyone who was invited to a shared folder to be able to click links to other locations without much hassle. If you've used OneDrive, Teams, and/or SharePoint across different devices, you may have run into issues where shortcuts work on certain devices and other shortcuts are un-openable. This can be really confusing if you're working with a group of people that have a mix of device types.

I did a little bit of testing and I can say that right now, the best option for cross-device compatible shortcuts is to use the .url format created on the web in SharePoint, OneDrive, and Teams.

This post will go into different file shortcuts across platforms and how to create these .url shortcuts. I'm not focusing on mobile devices because hopefully your users only access files through the official Microsoft apps and are not directly downloading files. This post may save you some headaches going forward.

Windows and MacOS have different kinds of file shortcut formats. The .lnk and alias shortcut files (Windows and Mac, respectively) contain metadata that point to the original file location on disk.

Note the “location on disk” part. When you're working on different devices (e.g. Windows device at work, MacOS device at home) or with other people on your team, that's where the issues pop up: When you create a shortcut and it's synced by OneDrive, the file is uploaded as-is and will point back to where you originally stored it on your computer's disk. Anybody with a different device or folder structure won't be able to access the file using that shortcut. If you try to access that shortcut on the web (Teams, OneDrive, etc.), it won't work at all.

Let's break down each platform and talk about the differences between them.

Windows shortcuts

On Windows, shortcuts are created by right clicking on a file, then selecting “Create shortcut”. If you have a file named test.png and create a shortcut in Windows, a file is created with the name test.png.lnk

.lnk files contain some ANSI text that's vaguely human readable, like in this example:

Screenshot of a .lnk file created in Windows 11

Note the second to last line that has a direct file path to C:\Users. This location won't be accessible on the web or to someone using a Mac as there is no C:\ drive mounted or accessible to those devices/locations.

When you open .lnk files on Windows, the native application will seamlessly open on your computer if the original file is accessible. .lnk files open the original file without any extra clicking.

When you open .lnk files on MacOS, you'll be prompted to select which app you want to use to open the file with the message “There is no application set to open the document 'Test.png'”. There are no native Mac apps that open these .lnk files and the shortcut won't work.

When you open .lnk files on the web, you'll see the text “There's no preview for this file” with options to Open or Download it. Opening the .lnk file shows an empty folder and the shortcut won't work.

MacOS shortcuts

On a Mac, shortcuts are called “Aliases” and append alias to the file. Aliases are created by right clicking on a file, then selecting “Make Alias”. If you have a file named test.png and create an Alias in MacOS, the new Alias will be named test.png alias (note the space between the original extension).

alias files also contain text that has parts that are human readable, like this:

Screenshot of the text contents of a MacOS alias file

Note the file:/// path that is pointing to a file identifier on my Mac's disk. This location won't be accessible on the web or to someone on Windows as the Macintosh HD disk isn't mounted on those platforms.

When you open alias files on a Mac, the native application will open seamlessly on your computer if the original file is accessible. Alias files open the original file without any extra clicking.

When you open alias files on Windows, you'll be prompted to select which app you want to use to open the file. There are no native Windows apps that open these Alias files and the shortcut won't work.

When you open alias files on the web, you'll see the text: “There's no preview for this file” with options to Open or Download it. Opening the Alias file shows an empty folder and the shortcut won't work.

OneDrive, Teams, and SharePoint shortcuts

OneDrive and Teams use SharePoint as backend file storage. All of these apps use .url as the shortcut file extension. .url files contain metadata that point to the original file location on the web. Shortcuts are created on the web by right clicking on the file and selecting Add shortcut > Other location. If you have a file named test.png and create a shortcut on the web, a shortcut file is created named test.png.url and has human readable text with the following content (for example):

Screenshot of the contents of a .url file created from OneDrive

Note that the URL= path is linked to a publicly accessible URL on SharePoint. This file pointer is not dependent on a local disk location and will be accessible to anyone with an internet connection and permissions to access the file.

When you open .url files on the web, the file will open using the default web application. If it's an Office file (.docx, .xlsx, etc.), the Office application will open on the web and you can edit it in the browser. If you want to open the file in the full desktop app, navigate to Editing > Open in Desktop App.

When you open .url files on a Mac or on Windows, the default browser will open and navigate to the file location on the web (SharePoint, OneDrive, Teams). You can use the web apps to edit the file online, or open it with a desktop application with those same steps.

Note: With .url files, be sure to Open the file from the web and avoid using the Download functionality. Opening the file will edit the original file. A Download is a new local copy of the file and your changes won't be synced back to the original file.

Conclusion

Let's look at each of these file extensions/formats in a table:

Extension Windows support Mac support Web support
.lnk Yes No No
alias No Yes No
.url Partial (opens in browser) Partial (opens in browser) Yes

Here's what I can conclude:

I hope this information is helpful. I've personally never thought about cross-device shortcuts that also need to work on the web and between different users. The user question was a good reason to dig in and figure out the best solution for everyone.

Discuss...