Homemade OneDrive On-Demand sync engine

TL;DR: See the project on my GitHub.

It has been 1.5 years since I last oragnised my camera roll. What happened 1.5 years ago? Microsoft removed the ‘placeholder’ function from OneDrive sync engine in Windows 10. Microsoft spokesman said that the feature was confusing for some people and people had difficulties understanding it.

Oh! It sounds like ‘孩子老踢被子,幸好我把他腿打断了,要不然她就着凉了’ (my child kept kicking the blanket and I broke his leg so that she won’t catch a cold). Simply ridiculous.

The real reason behind the removal of this useful functionality might be the ‘One’ roadmap that integrates OneDrive (personal) and OneDrive for Business, among others. And until then there was no code to use placeholders to sync OneDrive for Business. It still sounds like the story above but this time more plausible.

It is confirmed that Microsoft will bring this feature back with a new name ‘On-Demand Sync’. In Chinese community, an urban legend says that Microsoft has a special department called 改名部 (renaming department) and just to name a few achievements of this mysterious department:

  • Windows Live Mesh → SkyDrive → OneDrive
  • Surface → PixelSense
  • Windows Azure → Microsoft Azure
  • Microsoft DreamSpark → Microsoft Imagine
  • Groove → OneDrive for Business
  • Lync → Skype for Business
  • Zune Music → Xbox Music → Groove Music
  • Zune Videos → Xbox Videos → Movies & TV
  • OS X → macOS

I guess there is a CRO.

Anyway, it’s a bad idea to wait for Windows 10 Redstone as it is quite usual to see Microsoft postpones the releases. I wrote some simple PowerShell scripts that utilises Microsoft Graph API to enable me to arrange the photos. There are essentially three things to be done (and these are the exact three things programmed by me):

  1. Download the layout (as well as the thumbnails);
  2. Make new folders on OneDrive;
  3. Move files on OneDrive.

To achieve the goal, the code first downloads the layout, then allows the user to navigate and create folders. When the user finished creating new folders, the user can run another piece of script to synchronise the creation to OneDrive. Finally the user can move files inside the layout, and invoke a third piece of script to synchronise the moving operations.

See the project on my GitHub.

OneDrive and the cloud icon are trademarks of Microsoft.

Please enable JavaScript to view the comments powered by Disqus.