mirror of
https://github.com/clechasseur/pathcopycopy.git
synced 2026-04-25 12:15:58 +03:00
[GH-ISSUE #134] [FEATURE] One Drive Local Paths #134
Labels
No labels
bug
duplicate
enhancement
enhancement
enhancement
fixed
help wanted
help wanted
invalid
pull-request
question
waiting for input
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pathcopycopy#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dougransom on GitHub (Oct 30, 2020).
Original GitHub issue: https://github.com/clechasseur/pathcopycopy/issues/134
Originally assigned to: @clechasseur on GitHub.
I'm always frustrated when I edit a file in a OneDrive Library on mylocal file system, and I would like to share that file with another user who has that same Library synced to their local file system.
Right now we can't. If we use the OneDrive share feature, the other user ends up opening the file in their web browser instead of their desktop app. It sucks. So we usually copy the folder name with path copy or explorer like C:\Users\Doug\Org Name\operations - Documents and then type the file name in like "weekly meal plan.docx" into an instant message.
The recipient then manually navigates (since their folder will always have a different name than the sender for the same library ) to C:\Users\Bill\Org Name\operations - Documents and then look for and click on "weekly meal plan.docx".
Describe the solution you'd like
A conext Menu "Path Copy/Copy OneDrive Path" would put these two urls in the clipboard (properly url encoded):
pathcopyod://%OneDriveForBusiness%/Org Name/operations - Documents/weekly meal plan.docx"
and pathcopyod://%OneDriveForBusiness%/Org Name/operations - Documents/
That URL, send to anyone else who has the library synchronized to their computer and pathcopy installed, when they click on it, will open the the file and folder on their local computer respectively.
This does mean a URL scheme must be packed with PathCopy.
The OneDrive Libraries can be resolved by looking at Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\OneDrive\Accounts\Business1\ScopeIdToMountPointPathCache
It may be the ScopeID Value Name is the same for all users who are syncing the library, in which case the URL might instead be more simply
pathcopy:[ScopeID]/weekly meal plan.docx which we could exchange with each other using telegram or email etc.
@jonnywright commented on GitHub (Apr 26, 2021):
I have been trying to find a solution to this and thought I found one but I can't get it to work - this could well be down to my regex skills though (or lack of).
I created a custom command which uses regex to replace the second level of the path which (in my case) is my username. I would then replace the second level of the path with the environment variable %username% to make it work on anyone elses machine. Below is the regex I'm trying. It passes in regex101 but errors in PCC with Invalid regular expression
(?<=\w\:\\(\w|\d|\s|\.)*\\)(\w|\.|\d|\s)+@firewiremb commented on GitHub (Jul 23, 2021):
I want to agree with dougransom. PathCopy has unfortunately not been as useful for me since OneDrive was introduced in my company as it was in previous years.
In my opinion, a solution to this problem is urgently needed. Unfortunately, my programming skills are not sufficient to be able to contribute anything here.
@apotenza92 commented on GitHub (Nov 8, 2021):
I've dealth with a somewhat similar issue when creating an Excel VBA macro. I'm not sure who this might help but here's a code I found and slightly modified that turns sharepoint URLs into local paths. I suspect using something like this as a starting point (the way it calls the registry) could help with with this issue.
@clechasseur commented on GitHub (Dec 26, 2024):
Looks like I never replied to this. 😞 However, this should be doable through a custom command by manipulating the path. One possible solution would be to start by copying the file name only, then inserting a prefix using regular expressions:
That's just an example but provides the general idea.