none
How to create a link to a file stored in internet / cloud but appears as a 'local file' in Windows Explorer? RRS feed

  • Question

  • Similar to OneDrive's "Files On-Demand" as well as DropBox's "Smart Sync" functionality, I am curious how to create a file that appears to be on local disk normally but is actually linked / stored in the internet or cloud.

    I think this is different from .lnk or .url files as they retain the following even if they are stored on the cloud:

    • filetype (.pdf, .xlsx, etc.)
    • location on disk (e.g. folder path)
    • size (original file size though size on disk is 0)
    • file icon

    Is there another type of file or any metadata that tells Explorer that a particular file should be retrieved from the internet when it is accessed?

    Wednesday, January 10, 2018 2:06 PM

All replies

  • To implement something like that you have to implement a shell extension which converts the information to a file-like structure. Implementing a shell extension isn't trivial and requires that you have experience with COM. Using .NET as of v4 is technically supported now but there is still a lot of COM interop. There are plenty of examples online on how to do it in C++. You'll have to convert the logic to C#.

    But that is just what it takes to get it to show up in Windows Explorer as a "file system". I believe the OneDrive implementation goes even further and possibly uses a file moniker to allow paths to include OneDrive anywhere. This is more work.


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, January 10, 2018 3:03 PM
    Moderator
  • Hello OCS,

    Is there any update or any other assistance I could provide? You could mark the helpful reply as answer if the issue has been solved. And if you have any concerns, please do not hesitate to let us know.

    Thank you for your understanding and cooperation.

    Best regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Sunday, January 28, 2018 1:00 PM
    Moderator