All articles

How to Copy a Google Drive Link on a Mac Without Opening the Browser

· 5 min read

A colleague asks for the deck. The file is right there on your Mac, in the folder Google Drive for desktop keeps in sync — but the usual way to get its link goes through the browser: open drive.google.com, find the file again, click Share, then Copy link.

There is a shorter way. Every file and folder that Drive for desktop has uploaded carries its Google Drive ID on your Mac, and the link is built from that ID. In Folia Files, right-click the file and choose Copy Google Drive Link: the link is on your clipboard, ready to paste with ⌘V. The browser stays closed.

Copying a link shares nothing, though: who can open it depends on the file's sharing settings on Google Drive. More on that below.

Where Google Drive for desktop keeps your files

On current versions of macOS, Drive for desktop uses Apple's File Provider system. Its folder lives in ~/Library/CloudStorage/GoogleDrive- followed by your Google address, with My Drive inside (and Other computers if you back up a computer to Drive). The Finder shows it under Locations in its sidebar.

Folia Files lists it in the Clouds section of its sidebar, as “Google Drive” with your address, next to iCloud Drive, Dropbox or OneDrive. You browse it like any folder, side by side with your disks — see servers and clouds in Folia Files.

What the Finder offers, and where it stops

Drive for desktop adds its own commands to the Finder's right-click menu (open the item on the web, share it, get its link; the wording depends on Drive's version). They come from Drive's File Provider extension, and macOS shows those commands in the Finder only. In another file manager, in an Open or Save dialog, or anywhere else, you are back to the browser.

Copy a Google Drive link in Folia Files

  1. In the sidebar, under Clouds, click Google Drive and open the folder that holds the file.
  2. Right-click the file. To get several links at once, select the files first (⌘-click) and right-click one of them.
  3. Choose Copy Google Drive Link (Copy Google Drive Links for several).
  4. The pane says “Google Drive link copied”. Paste the link into your message, chat or document.

Folia Files: a file in Google Drive for desktop's folder, its context menu showing Open in Google Drive and Copy Google Drive Link

The two Google Drive commands appear only for items inside Google Drive's folder (every selected item must be in it), between Share and AirDrop….

The link is the one Google Drive itself gives:

  • a file: https://drive.google.com/file/d/ID/view?usp=drive_link;
  • a folder: https://drive.google.com/drive/folders/ID?usp=drive_link;
  • a Google Docs, Sheets or Slides file: the address of the document itself, on docs.google.com.

With several items, you get one link per line. Nothing is sent to Google and you don't sign in to anything in Folia Files: it reads the ID that Drive for desktop stored with each file and writes the address.

A link to the folder you're in

Right-click an empty part of a Drive folder, and the same two commands act on the folder itself. Handy for sending a whole project folder.

The background menu of a Google Drive folder in Folia Files: Open in Google Drive and Copy Google Drive Link for the folder itself

Open it on Google Drive instead

Open in Google Drive opens the item's page in your default browser: the folder, the file's preview, or the document itself for a Google Docs file. If several Google accounts are signed in to your browser, the page opens in the account the Drive folder belongs to. You can open up to ten items at once.

Who can open the link you copied

The link points to the file; it doesn't change who may see it. That is decided on Google Drive, in the file's Share window, under General access:

  • Restricted: only the people added to the file can open it. Others are asked to request access. Unless you or your organization changed it, this is usually how a file in My Drive starts.
  • Anyone with the link: whoever has the link can open it, as viewer, commenter or editor, depending on what you chose.
  • People who have access to a shared folder can also open the files inside it.

Folia Files has no sharing command: permissions are set on Google's site (or through Drive's own commands in the Finder). The quickest way there is Open in Google Drive, which lands on the file's page, where the Share button is. Check access once, and from then on copy the link from your Mac.

Google Docs, Sheets and Slides files

In Drive for desktop's folder, a Google document is a small file (.gdoc, .gsheet, .gslides, and so on) that points to the document online. Folia Files draws its own icon for each kind, names it in the Kind column (“Google Docs document”, “Google Sheets spreadsheet”…), and opens it in your default browser on a double-click or with Open in Browser in its context menu. Copy Google Drive Link copies the address of the document itself.

When there is no link yet

The ID only exists once Drive has uploaded the item. Right after you add a file, or while a big one is still uploading, Folia Files says: “Google Drive has no address for “…” yet (upload not finished?)”. Wait for the upload to finish and try again.

The same holds outside Folia Files. In Terminal, this command prints the ID of a file or folder of Drive's folder:

xattr -p 'com.google.drivefs.item-id#S' "path/to/file"

Put it in https://drive.google.com/file/d/ID/view (or drive/folders/ID for a folder) and you have the link. If the command answers that there is no such attribute, Drive hasn't uploaded the item yet.

Keep the menu the way you want

The two commands are one entry of the context menu, Google Drive: open, copy link. In Settings › Context Menu, give it a place: In the Menu, In “More” or Hidden, like any other entry. Customizing the right-click menu explains the rest. And if you need the file's path on your Mac rather than its web link, Copy Path is in the same menu (copying a file path on a Mac).