Share via

How does OneDrive Sync App handle an opened/locked local file

gmorrissui 70 Reputation points
May 15, 2023, 10:54 PM

How does OneDrive Sync App handle the scenario of a local file that is an older version and is opened/locked? We have local files that do not undergo change. They're opened read only by a 3rd party app. Newer file versions happen in the cloud; we leverage OneDrive Sync App to distribute them to the devices. Opened files are locked.

For example, the cloud instance of a file is updated by an admin, making the local file instance an older version. OneDrive tries to sync the cloud instance to the local device, but sync fails because the local file is locked. From our observations it seems OneDrive creates a new instance of the local file with the device name in the file name, e.g. master instance FileA.xyz cannot be updated so new instance "FileA - mycomputer.xyz" is created. Will OneDrive Sync auto-update FileA.xyz once FileA.xyz is closed/unlocked? Or must we first delete the "device name" instance of the file before a sync of the master instance is retried by OneDrive Sync?

We also observe iterative instances of "device name" files, e.g. "FileA - mycomputer - 2.xyz", "FileA - mycomputer - 3.xyz", etc. I am familiar with these "device name" files when a sync/merge with the cloud instance cannot be performed, but in this scenario these files represent failures to sync from cloud to local. Are these iterative file instances being created because OneDrive Sync App keeps retrying to sync the locked master file instance? Or are they being created only when the master file in the cloud is updated a 2nd time, a 3rd time, etc. while the local file is locked?

Our plan is to automate with a script the cleanup of the "device name" file instances once we have an accurate understanding of how OneDrive Sync handles locked local files.

Thank you.

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,321 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,373 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.