TipBITS: Replace a Shared Dropbox File without Changing Its Link

Originally published at: https://tidbits.com/2019/12/11/tipbits-replace-a-shared-dropbox-file-without-changing-its-link/

If you have shared a file in Dropbox but now need to replace it without changing the previously shared link, don’t replace the file in the Finder. Adam Engst explains what to do instead.

Well I wish I had known about this a long time ago.

Thanks!

Also: the “Desktop” app in Dropbox should be killed with fire, and everyone involved with its creation should be sent to bed without any dinner.

Yeah, I disabled that the first time it popped up. What a way to completely ruin Dropbox!

Thanks for that tip.

I launched the desktop app when they rolled it out, thinking it would offer some added value. I’m still scratching my head.

Two things about that:
T1. The whole point of Dropbox is to work as though it’s part of the native file system. It looks and acts like a folder that can be operated upon using Finder. Overlaying a dedicated Finder-like substitute is clearly off their brand. BUT…
2. iOS by design did not have a file browser. So, Dropbox has always had to have their own app to provide one. So, in a cracked sort of way, it makes sense that Dropbox would want to bring something like that to MacOS.

Though I must agree, unwanted and destined to sit in bit-rot hell on my macOS machines.

So tell us what you really think. :slight_smile:

Happily, I’ve been able to almost completely ignore the Dropbox desktop app since I can’t really see any utility to it. I think Dropbox is just trying to insinuate itself at a higher level of my workflows—that might work for people starting new or who are heavily invested in Dropbox Paper as well, but for me it’s just some bits on the drive.

Agreed. I cancelled our paid Dropbox account and left my wife using the account with the 12GB of space we’d gotten for who knows what, tried to revert to my previous Dropbox account and found Dropbox had deleted it. ¯_(ツ)_/¯

I moved my files on DropBox to iCloud Drive when DropBox decided to limit the number of devices you could use with a free account to 3. I kept my free account with DropBox, I just don’t use it much anymore.

I liked DropBox better than iCloud Drive, but iCloudDrive has become better and suits my needs just fine. I was willing to pay DropBox a few Euro a month for 200 GB, which is more than enough for my needs, but they won’t offer that (I asked), so now my money is going to Apple.

I’d switch to iCloud Drive happily if Apple would ever ship the folder sharing feature.

I agree entirely about the pricing plans for Dropbox—I don’t need 1 TB of space and can’t justify $100 per year now that we’re not relying on it for Take Control. But there’s nothing between the free 22 GB I have and the 1 TB plan.

1 Like

Not sure if this is clear to everyone, but you can toggle between the native Dropbox app view AND Finder view. It took me a while to realize that but once I switched back to Finder view, I am much happier.

Go to Preferences in the Dropbox app, General > Open folders in: Finder.

Cool tip!

It reminds me a little of Google Drive which optionally treats an uploaded file with the same name as a new version of an existing file.

Now if only Dropbox for iOS and iPadOS would follow Alias folders, I’d be golden!

Partly in response to Taking Control of your Digital Legacy, I decided to make my most important folders, many of which are deeply nested, more accessible. To do this, I created a top level folder full of folder aliases in my Dropbox. This has improved productivity swimmingly on my various Macs.

The problem is, on my iPhones and iPads the Dropbox app doesn’t follow those aliases so they’re useless and I’m forced to navigate slowly and painfully all the time. Seems like a lame and inexcusable omission on Dropbox’s part.

I read that making a Unix symlink rather than a Mac alias might get this to work. I have not tried this but I’m also nervous about trusting my most valuable files (and the backup and sync thereof) to a technology that macOS hasn’t exposed.

Has anyone tried this and had success with it?

Update regarding symlinks In Dropbox…

We do not recommend the use of symlinks. They are known to cause many issues to the accounts, and could be proven quite troublesome.

I’ve gotten this reply before. I think there are likely issues but they’re being too vague. Perhaps my use case would work fine.

Would still love to know if anyone else has had success with this.

The Command Control Power podcast guys were talking recently about how symlinks can really screw up Dropbox and prevent it from syncing.

Re: symlinks in Dropbox.

This is the scenario where thinks will definitely go wrong:

I have a Mac at home and a Mac at work, and they share a Dropbox folder, where basically I put all my stuff.

If I create a symlink in one of the two Macs, Dropbox will create a physical copy in the other Mac and not a symlink. So, the two distinct copies will evolve differently. Urgh.

–e.

If I create a symlink in one of the two Macs, Dropbox will create a physical copy in the other Mac and not a symlink. So, the two distinct copies will evolve differently. Urgh.

Doh, why didn’t I think of this! Well, it’s possible that Dropbox could choose NOT to follow the symbolic links and to, instead, copy the files themselves. But I just did the test you described above. And sure enough, a symlink to a file on one Mac got synced by Dropbox as the linked file on the other Mac. Not what I wanted.

Most Unix programs give you options here. Eg, the standard command for copying files “cp” has a -P switch which ensures that symlinks are not followed but are, instead, treated literally ("P"reserved). This is actually default behavior for cp and that behavior can be reversed with -L.

Dropbox should offer similar options to give us users control over whether symlinks are treated literally (like I want) or whether it should follow them.

Not necessarily, Enrico. That’s my scenario too. I’ve been using symlinks with Dropbox for some years now. You need to pause syncing on each machine while you create the symlinks in each of your DB folders. When you re-enable syncing, it will work nicely. I have ten at the moment.

I’m aware of the warnings, but I’ve not had a problem. Yet.

Jeremy

1 Like

Here’s what Dropbox says about symlinks:

Adam,

Thanks for that. By coincidence, I received an email from Dropbox a couple of days ago, saying that they have changed the way symlinks are handled, in that they are now not followed but merely copied as files. The past tense was used, which to me implied that the change had already been made.

The article you link to gives that impression as well:

As of mid-2019, Dropbox no longer follows items outside of your Dropbox account that are linked to by a symlink

The problem is that that sentence is, in my experience, simply untrue: Dropbox has been following the ten symlinks in my Dropbox folder and syncing the folders they point to since mid-2019, as it has for years before that. Most of the ten are in daily use, so I’d have noticed any sync failures very quickly indeed.

However, it’s a useful prod. I think the solution is to reverse the setup: move the folders to be synced into the Dropbox folder and put symlinks where the relevant applications expect to find the folders.

Jeremy

As of mid-2019, Dropbox no longer follows items outside of your Dropbox account that are linked to by a symlink

The problem is that that sentence is, in my experience, simply untrue: Dropbox has been following the ten symlinks in my Dropbox folder and syncing the folders they point to since mid-2019, as it has for years before that. Most of the ten are in daily use, so I’d have noticed any sync failures very quickly indeed. @jbr

But see my previous post: my test doesn’t match what they or you are reporting. The symlink I created in my Dropbox on Mac A pointing to a file also in Dropbox on Mac A synced to Mac B as the target file itself: not in the target file’s location, but in the place on Mac B where the symlink was on Mac A.

So, I just did a fresh test, and sure enough the behavior has changed. Not surprised, since Dropbox can’t seem to decide how they want this to work. The symlink now syncs to the other Mac like it’s a regular file, and therefore shows up like a symlink at the same location on the other Mac, and the target file is never touched. (More precisely, the target file is also in Dropbox, and gets synced by normal Dropbox operations, and not because a symlink is pointing to it, a point that is not clear from the wording at the link Adam provided).

Cool feedback.

But I agree with the “yet”, and your idea scares me. I have many Macs, and have to rebuild or buy a replacement one often enough, and then set up Dropbox fresh. What happens if I forget to set up all my symlinks on the new one before I sign into Dropbox? No matter what the answer is, the unpredictability of putting my data at risk makes that a no-go for me!

I’m going to throw out one other twist that adds even more uncertainty to your idea. I have a paid Dropbox account that allows Smart Sync, which lets you choose whether a file or folder is “Local” (like the free Dropbox for Mac works) or “Online Only”. In the latter case, it appears that Dropbox creates the full inode of the file (name, date, size, permissions), but puts no data in it (see ls -l and Get Info). But then as soon as you try to read the contents of the file, I’m guessing they invoke fsevents() and sync it down.

So this is sort of their own type of “symlink”. So what’s the behavior when symlinks and Dropbox “smart sync” files start crossing paths? I’m sure it can only make the uncertainty level higher than before!

Thanks for this @ace.

I’m going to go back to the fact that – Hello!! – the Mac already has something called an Alias, which is supported by the macOS and also doesn’t require any fiddling on the command line. The only reason any of us are talking about symlinks is because Aliases aren’t being handled the way we want, eh?

In my case, I’m not trying to use a symlink to sync something outside Dropbox. I simply want the Dropbox app on iOS to FOLLOW Aliases when I tap on them, particularly since my Aliases are to folders. It’s a navigational aid.

Seems like an oversight to me.

Makes me wonder how Dropbox treats Windows “Shortcuts”… So many questions, so little time!