Forum Discussion
Palijn
Sep 28, 2022Copper Contributor
How can I run the Onedrive.app command-line on MacOS ? (As a workaround for files not being synced)
Hello, OneDrive is not syncing files that have been created on one Mac to another Mac logged in with the exact same OneDrive (personal) account, even when the option to always keep the files locally...
stevegroomSRO
Nov 16, 2022Copper Contributor
Palijn This is probably not what you are looking for but it does show that scripts can work with oneDrive in a rudimentary way:
https://github.com/soundsnw/mac-sysadmin-resources/blob/master/scripts/fix-onedrive-filenames-apfs.sh
I have used this script several times to fix sync errors caused by stricter file naming conventions.
regards
Steve
Palijn
Nov 16, 2022Copper Contributor
Thanks a lot.
I think the key here is the
killall OneDrive || true
at start of the script
and the
[[ $(pgrep "OneDrive") ]] || open -gj "/Applications/OneDrive.app"
at the end of it.
The script itself does not use OneDrive.app purported command-line functions, so I guess I'm still left to try them after having killed the app first.