Junction with OneDrive


  1. Posts : 925
    Windows 10 Pro
       #1

    Junction with OneDrive


    I'm having a problem with junctions. I posted the problem here, considering the last post was months ago; not sure it will get noticed for a while, so I decided to re-post as a new thread.

    I created a junction whereas the link is the source folder, and the target is the junction as displayed in command prompt, but when I create a file and save it in either the link or the target folder neither the link or the target have the same file mirrored between both folder so to speak ?

    One thing I forgot to mention is, I'm creating a junction between OneDrive and a local folder, although that shouldn't have any problems considering OneDrive local location for sending files to the cloud is X:\Users\... and behaves no different then if I was creating a junction between two local folders.
      My Computer


  2. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #2

    Hello,

    Out of interest, how many reparse points have you set up by now? You’ve been asking all sorts of questions regarding this topic since mid last year and you must surely have the technique down by now.

    As it stands currently, there lacks sufficient detail of the problem for us to investigate and subsequently offer a solution or worthwhile suggestion for. Please provide more detail. It’s not clear what kind of answer you are expecting with the current problem statement.

    JerometheGiraff said:
    I created a junction whereas the link is the source folder, and the target is the junction as displayed in command prompt, but when I create a file and save it in either the link or the target folder neither the link or the target have the same file mirrored between both folder so to speak ?
    The expected outcome was not gained, so what was the outcome you got instead? A better question, what are you trying to accomplish? What have you tried? And how did your attempts not work? We can’t known unless you tell us.


    JerometheGiraff said:
    I'm creating a junction between OneDrive and a local folder, although that shouldn't have any problems considering OneDrive local location for sending files to the cloud is X:\Users\... and behaves no different then if I was creating a junction between two local folders.
    Right, it shouldn’t matter as long as the link and target are local and, if using junctions, on the same partition.
      My Computer


  3. Posts : 925
    Windows 10 Pro
    Thread Starter
       #3

    The outcome I am expecting is, regardless if I copy or create a file on the linked path or the target path within a Junction the file gets duplicated between both locations.

    I copy a file to a linked junction location, that file should then be duplicated / mirrored to the target junction location which is, in this case, OneDrive and automatically uploaded to the cloud in one pass. That is not happening instead, when copying a file to the linked junction location, the target (OneDrive) doesn't receive the file as you would expect the Junction to work. All I have done up to this point is create a Junction whereas I switched around what was the link and the target, to now what formally was the link is now the target, and the target is now the link and in both cases the file doesn't update between the two junction locations ?

    For a Junction (folder) to work, either the link or the target cannot exist. Otherwise you get an error "cannot create file when that file already exists" That is exactly what I've done. I've deleted the linked location, but kept the target which is OneDrive. I'm unable to access the linked location within Windows without the error "cannot file specified path", but the Junction is linked to the one path; I can access the target, not the link.

    When doing a directory listing for the link which is a local folder;

    Code:
    <JUNCTION> Avatar [C:\Users\<userName>\OneDrive\Avatars]
    You can see the target is listed as a Junction and files can be wrote to it, but the linked location you cannot access or write files to it as mentioned to setup a Junction.
      My Computer


  4. Posts : 31,249
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #4

    Have not done much Dynamic link work for a while but it could be the nature of the target (system folder for OneDrive), that is the issue.

    What I would do is disconnect the onedrive link first, Right click on icon in notification area, then create the symbolic link to a suitable folder, (empty) and once the Link is working re-start OneDrive and point it to the actual folder (not the link)

    This way any file dropped into either the link or the real folder should be picked up

    By the way, when using symbolic links there is ony one active location - you do not create a duplicate of a file, the Symbolic link is a transparent conduit to the actual location think of it as a super shortcut
      My Computers


  5. Posts : 925
    Windows 10 Pro
    Thread Starter
       #5

    Right click on icon in notification area, then create the symbolic link to a suitable folder
    What do you mean right click on icon in notification area ?
      My Computer


  6. Posts : 31,249
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #6

    A little confusion I think Here
    What I would do is disconnect the onedrive link first, Right click on icon in notification area
    Just pointing out the way to disconnect the folder from the OneDrive service
      My Computers


  7. Posts : 925
    Windows 10 Pro
    Thread Starter
       #7

    Barman58 said:
    A little confusion I think Here
    What I would do is disconnect the onedrive link first, Right click on icon in notification area
    Just pointing out the way to disconnect the folder from the OneDrive service
    I understand but what notification area are you referring too, the notification area in the task bar in Windows ?
      My Computer


  8. Posts : 31,249
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #8

    The taskbar notification area of course

    The little cloud icon contains the settings for onedrive, you can Unlink the current PC from Onedrive, which will remove the system status from your current onedrive folder, (and any others that may have been used as such in the past), which may allow you to create a working symbolic link, Test it, then relink the Onedrive to the Target of the symbolic link
      My Computers


  9. Posts : 925
    Windows 10 Pro
    Thread Starter
       #9

    Barman - That was the solution turning off OneDrive :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:41.
Find Us