Windows 10: Hardlinked files within OneDrive folders

Discus and support Hardlinked files within OneDrive folders in Windows 10 Network and Sharing to solve the problem; Hello, I have a simple question because I cannot figure out OneDrive's behaviour in this scenario. Suppose I have some text file in a OneDrive... Discussion in 'Windows 10 Network and Sharing' started by Ilia_972, Jun 6, 2019.

  1. Ilia_972 Win User

    Hardlinked files within OneDrive folders


    Hello, I have a simple question because I cannot figure out OneDrive's behaviour in this scenario.

    Suppose I have some text file in a OneDrive subfolder that I need to reference in several different projects, simultaneously.
    I want to keep only one copy of this file, but every project resides in its own subfolder and cannot reference files outsides (basically, git-based repos).
    My solution: I make hardlinks of the source file in each projects' directory, and it works fine (locally). I can edit any "copy" of the file and changes automatically propagate to the source file and to all other linked ones.
    Things change when OneDrives starts its synchronization. First of all, it ignores hardlinked files (similar to the soft links). So, on every other machine, I have to re-create hardlinked files as only the source one is synched (makes sense as I know of no simple way to check if a file is, in fact, a hardlink). After a while, synchronization screws everything on each system that has these OneDrive folders - I get multiple "You now have several copies of the file xxx.yyy", which spawns copies of the hardlinked files, postfixed with machine names, effectively breaking the links. Fortunately, it does not destroy the source file, which is synched and kept up to date.

    I was wondering what is the correct approach to handle such situation, i.e. when you need to have access to the same file in different OneDrive folders and relative paths/soft links do not work for you.


    Thanks in advance.

    :)
     
    Ilia_972, Jun 6, 2019
    #1

  2. Sync files via OneDrive that are hardlinked to other locations

    I use OneDrive to sync a script between multiple computers, including between my home and work machines. At work, we recently implemented separate logins for normal vs. admin access. This caused a problem because my script requires running under admin rights, but my admin account doesn't have access to my normal account's document folders where OneDrive syncs. I initially got around this by just manually copying the scripts between the sync location and one where the admin account can reach.

    I next tried using a hardlink on my work computer, set up where the original file was in the sync location and the hardlinked version was in the outside folder. This worked great when I made changes to the script from my work machine, but I recently found that if I make changes on my home machine it breaks the hardlink. It seems that the process of OneDrive syncing the files works as a delete and re-add, so the delete step breaks the hardlink. The script continues to work because the "linked" file now becomes a standalone file.

    Can anyone think of a way to keep these syncing, or a better way to do the same thing? I don't think there's a way to change the hardlink behavior because that seems to be integral to its design. OneDrive syncing a single file to a different location than the rest would be ideal, but I haven't found a way to do that.
     
    techturtle, Jun 6, 2019
    #2
  3. onedrive duplicating my folders...

    Hi.

    Again, onedrive is going crazy and is duplicating my main folder, full of subfolders. It's locking me out of all my files. I have windows 10, Office 365 home. I paused synch at the moment before I have 1000 copy of my folder, which I can't open anyway!
    Please don't ask me any question that will further delay the repair. Simply give me a step by step solution and then improve onedrive so this won't happen again to so many of us. I suggest you also add "onedrive" in the list of "Windows Topics" below since
    thousands of users have issues with it.

    Thanks

    Michel

    *** Email address is removed for privacy ***
     
    Michel Chiangmai, Jun 6, 2019
    #3
  4. Hardlinked files within OneDrive folders

    Music Folder Behaving Badly in OneDrive

    Hi Robert,

    There is a possibility that the Music folder is synced to your OneDrive that is why any files deleted from either of the folders is synced to the other. For us to better assist you with the said folder, we'd like to ask for additional information:

    • Can you please provide a screenshot of the Music folder from the OneDrive folder and home folder?
    • What are the troubleshooting steps that you were advised to do?
    We will wait for your quick response.
     
    Jennifer Cha, Jun 6, 2019
    #4
Thema:

Hardlinked files within OneDrive folders

Loading...
  1. Hardlinked files within OneDrive folders - Similar Threads - Hardlinked files within

  2. need to use powershell to create folders and move files within the local OneDrive folders -...

    in Windows 10 Gaming
    need to use powershell to create folders and move files within the local OneDrive folders -...: I have a ps script that moves all images from a staging folder to a set of sub-folders that are created for the pictures in yyyy\yyyy-MM\ naming pattern. This script runs fine in folders that are not in the local OneDrive folder, but fails for any file that is in OneDrive....
  3. Shortcut for a file within a folder

    in Windows 10 Network and Sharing
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  4. Shortcut for a file within a folder

    in Windows 10 Gaming
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  5. Shortcut for a file within a folder

    in Windows 10 Software and Apps
    Shortcut for a file within a folder: to keep my desktop clean I group my apps into folders. I want to have a few shortcuts for my most used apps snd games. Now when assigning a shortcut via the properties screen the shortcut is only working while the folder in which the file is located is already opened. I could...
  6. Sorting files within folders

    in Windows 10 Ask Insider
    Sorting files within folders: Hi, how to permanently add an option to be able to sort "by type" and also "by dimension" inside all folders? submitted by /u/DarkGladir [link] [comments] https://www.reddit.com/r/Windows10/comments/mq6hhf/sorting_files_within_folders/
  7. Executable Program within a Saved Folder on OneDrive

    in Windows 10 Network and Sharing
    Executable Program within a Saved Folder on OneDrive: I have a folder with years of scanned documents. The folder has an executable program that searches and finds requested pages or documents. I use window 10 operating system. The folder is approx. 876MB My question: Can I save the Folder to OneDrive and then open it and run...
  8. Have A Folder Within OneDrive Folder Not Sync

    in Windows 10 Network and Sharing
    Have A Folder Within OneDrive Folder Not Sync: Hi, I have a folder within my OneDrive folder that I would like to keep from syncing. How can I make it so that this folder is not synced? Thanks in advance...
  9. Files within Folder

    in Windows 10 Network and Sharing
    Files within Folder: When transferring numbered files into a folder they were entered out of sequence. It there a way to move the files into sequence? https://answers.microsoft.com/en-us/windows/forum/all/files-within-folder/7a31db01-f717-4311-b6da-5c631a22b3c6"
  10. OneDrive subfolder within My Documents folder with same files again.

    in Windows 10 Network and Sharing
    OneDrive subfolder within My Documents folder with same files again.: File Explorer tree shows blue OneDrive folder w/ std folders; Downloads, My Documents, Pictures, etc. However, within My Document folder there is ANOTHER OneDrive folder w/ what appears many of the same files. Comparing the hundreds of folders would take forever. What's...

Users found this page by searching for:

  1. copy from onedrive creates hardlink on desktop