Forum Discussion

Palijn's avatar
Palijn
Copper Contributor
Sep 28, 2022

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 is selected on the root OneDrive folder.
Use case : OneDrive runs on both Macs. One both Macs, go to Onedrive location in the Finder. Right-click in the Finder view and select "Always keep on this device".
Then create a .docx file in the OneDrive folder on one mac. Wait. The other mac shows the file, but it is not downloaded. Attempts at accessing the file from a backup software (Arq Backup) results in an error that the file is not on disk.
This is my main problem, so if anyone has suggestions to fix it, I'll be really happy !

Now : as a workaround, I wanted to try to pin any new files from a script by running /Applications/OneDrive.App/Contents/MacOS/OneDrive /setpin as per Set Files On-Demand states on Mac on Microsoft documentation

But this does not work : launching the OneDrive app from Terminal results in an error that Onedrive.app  is already running (well, duh, of course, otherwise how would it sync ??) : OneDrive[7456:546949] Another instance of OneDrive is already running. Shutting down.

 

Has anyone worked out how to actually use the app as per the documentation says ?

Thanks !

Resources