Saturday, September 8, 2012

Using directory junctions to synchronize any folder to SkyDrive

Although I ditched SkyDrive as my general cloud storage provide, I still use it for selected scenarios. For anything beside Office files, Pictures or Music, I switched to DropBox (finally no more problems with big TrueCrypt containers!).

The Office integration in SkyDrive is just awesome. All my OneNote files are synced to SkyDrive so I have full access to them with just a browser from anywhere.

It also works great for music and picture synchronization. Pictures can be viewed directly using the SkyDrive website and I’m pretty sure they will add direct MP3 playback also (currently you can only download MP3 files).

By default, SkyDrive synchronizes anything inside <USERNAME>\SkyDrive. Easy to understand, but I simply don’t want to move my music from <USERNAME>\Music to a new folder.

To make SkyDrive sync that folder anyway, you can simply create a directory junction (with MKLINK.exe) inside the SkyDrive folder that points to <USERNAME>\Music. This will make SkyDrive think the folder is actually belonging to it and will start to sync it right away.


(Please note that you need to execute this with Administrative privileges!)

After this command, you then have the folder \DirJnc_Music inside your SkyDrive folder that points to \Music. As this new folder is just a “pointer” to \Music, any change to \Music will cause SkyDrive to sync the change as well.

Simply do the same with \Pictures and you are done. In case you do not want this integration anymore, just delete this \DirJnc_XXX folder inside \SkyDrive. The original folder will not be deleted as you only delete the created directory junction.

By the way: You can use NirSoft NTFSLinkView to display all junctions that exist on your system. You will be amazed how often this feature is used.

UPDATE: About two minutes after I put this online, I found out that Jan Hannemann has already blogged about this in April and even provides a nice Shell Extension for Windows Explorer!

No comments:

Post a Comment