OneDrive – Files on Demand

Window 1709 (Fall Creators) has a great new feature called Files on Demand.  It is a OneDrive feature that we actually talked to Microsoft about at Ignite in 2015.  Basically it makes OneDrive more like other file syncing tools, where the file names and directory structure is always shown but the file content may or may not be on the local machine.

OneDrive Settings

The cool thing (or not so cool if you’re a Mac user) is that Microsoft have changed NTFS to accommodate the OneDrive features meaning that it is deeply ingrained and transparent to anything that wants to use those files.  As long as the computer is online then the OS will seamlessly grab any files it needs from Office 365 and makes them available to the application.

The new pieces of the puzzle are

  • LastAccessTime/LastAccessTimeUTC
  • Attributes

If we look at some files on my OneDrive for Business

OneDrive File Explorer OneDrive PowerShell

So I have three files “4ward365 blogs.txt” is on the cloud, “4ward365 Pricing.xlsx” is pinned to be on my machine and “4ward-functions.xlsx” is on my machine but is not pinned.

Now at the moment pinned and unpinned has no impact but in future we expect there to be the ability to use LastAccessTime to automatically remove anything from the local machine that hasn’t been accessed in the last 30 days unless it is pinned.  More akin to Outlook with it’s slider bar.

You can script the new attributes however only via attrib.exe

So you can

a) remove a pin from an item and free up space

attrib <filename> -P +U

b) add a pin to an item

attrib <filename> +P -U

c) remove a pin but leave it local

attrib <filename> -P -U

 

Twan van Beers

Twan is a senior consultant with over 20 years of experience. He has a wide range of skills including Messaging, Active Directory, SQL, Networking and Firewalls. Twan loves to write scripts and get deep and dirty into debugging code, in order to understand and resolve the most complex of problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Search