How to sync individual files with Live Mesh

Live Mesh is great if you want to sync entire folders across computers and devices but doesn’t allow you to sync individual files – it’s all or nothing. Or should I say it did, because you see where there’s a will, there’s a way. The way Rafael and I have come up with will allow individual files to be Meshed without any additional software or background processes. It’s not perfect but it works.

Please note the following tutorial involves modifying your file system and may result in catastrophic data loss or corruption. Now harden up and try this at home.

As a quick explanation, there is no getting around the current Live Mesh restriction of folders. So what we need to do is work around the problem locally. A feature of the NTFS file system is support for “hard links“. What “hard links” allow you to do is have multiple pointers to the same “physical” file in the file system. (Quick side note, this is different to symbolic links which does not work with Live Mesh).

What hard links means in reality is that you can have multiples of the same file in different location. So the first requirement is that you need to be using a NTFS file system. A consequence is that you can only create hard links for files on the same volume (ex. C:\).

On with the tutorial. The first step is to create a Live Mesh folder dedicated to storing hard links. I recommend putting it within easy reach but still out of sight. I created mine as “Live Mesh Files” under “%userprofile%“.

Next is to add this folder to your Mesh.

Now open a command prompt in administrator mode.

To create a hardink, use this syntax “fsutil hardlink create “. So for example,
fsutil hardlink create "%userprofile%\live mesh files\test.txt" "%userprofile%\desktop\test.txt"

Now your file should also exist in the Mesh folder.

And online. Tip, if you don’t necessary need these files available via online, right click the folders on the Live Desktop and disable syncing to it.

Before you pop the champagne cork, realize you’re only half way done, it’s not syncing to anywhere yet. We have to also setup the files on the other end to sync to where we want them to.

On your other Live Mesh PCs, double click on the newly created blue folder and point it to where you would like to hide the folder again.

Now open up command prompt in administrator mode and run the command but with one difference in the parameters. Remember to swap them. So if you want to place the newly Meshed file on your desktop, you would write,
fsutil hardlink create "%userprofile%\desktop\test.txt" "%userprofile%\live mesh files\test.txt"

Now you’re done. Rinse and repeat for other files.

To reiterate, there are a few consequences with “hard linked” files. Hard links will only work within one volume so if you want to sync individual files on multiple volumes, you will unfortunately have to set up multiple “Live Mesh Files” folders on each volume. Also, deleting the original file will not delete the one in the Mesh Files folder, you’ll have to do it manually.

One possible scenario where syncing individual files might be handy is setting up a synchronized Firefox profile. Whereas if you synced the entire profile (%userprofile%\AppData\Roaming\Mozilla\Firefox\Profiles) you’d be stuck with the caches too, but now you can just sync the important files such as bookmarks, passwords and form history across.

If the above is a little too tedious for you, Rafael is already in the process of making a lightweight application to automate much of the process.

Are there any other sync scenarios you can think of where individual files might come in handy?

7 insightful thoughts

  1. @Brian as in, folders inside the ‘root’ directory of what you’ve chosen to add to the mesh? Yes – all files and folders (and thus subfolders) are treated in the same manner.

  2. Paul, I know in earlier versions of mesh, folders with subfolders weren’t supported , thats why im asking

  3. Would like a way to disable sync of a sub-folder. I sync a test build tree and i don’t want to sync the obj’s. I guess I could just alter the project to put the obj’s in a parallel tree but that seems like more work.

  4. Greate post! I always wondered if there’s a way to create a pointer to a file, that exists in some other folder. It’s better than creating a copy of that file and then copy-pasting it everytime we modifity it. Plus, it wastes disk storage too.

    BTW, recommend people to use PowerShell, instead of Command prompt. It’s way better and much more powerful 🙂

Comments are closed.