Files that change while they're being transferred
A file that is still being written while it's copied — a growing log, an open download — doesn't match by the time the copy ends. Storage Studio finishes everything else, fetches those files once more, and leaves any still changing for the next run.
A file that is still being written while Data Transfers copies it — a log file that keeps growing, a download in progress, a document an app is saving — is a different size by the time its copy finishes. Storage Studio notices the mismatch rather than keeping a copy that doesn't match, finishes everything else, and deals with those files separately.
What happens
For a Copy, a Sync (one-way) or a Bidirectional sync where the only problem was files that were still changing:
- The transfer is marked Completed, and its details say so: "Everything was copied except 2 files that were still being written", followed by their names (up to five, then "…and N more").
- Straight away, a follow-up Copy of just those files starts. It takes them as they are at that moment — for a file that is still being written, that's a snapshot partway through. The follow-up appears in the list as a separate Copy with the same source and destination.
- If the follow-up finds them changing yet again, it doesn't keep chasing them. It finishes as Completed and says the files "were still changing while being copied, so they were skipped this time" and "They'll be copied on the next run."
The next run — Sync again, Run again or the next scheduled run — picks them up once they have settled.
Flowchart outline: How a transfer handles files that were still being written
- The transfer finishes
- leads to Did only still-changing files fail?
- Did only still-changing files fail?
- No: leads to The transfer shows Failed with the reasons
- Yes: leads to Marked Completed and a follow-up Copy starts
- Marked Completed and a follow-up Copy starts
- leads to Are those files still changing?
- Are those files still changing?
- No: leads to Copied as they are now
- Yes: leads to Skipped this time and copied on the next run
When it's reported as a failure instead
- A Move isn't handled this way. The transfer shows Failed with a message that some items "couldn't be copied because they changed on the source while they were being copied", and lists them. The rest of the move went ahead; run it again once those files have settled.
- A transfer with other problems as well — a permission error, a full destination — shows Failed, and its details list what wasn't copied and why. See A transfer failed.
- A very large single-file download stops if the original changes part-way: "The original changed while it was downloading, so the transfer stopped rather than mixing two versions together." What arrived is kept; start it again to fetch the new version.
How to avoid it
- Close the app that's writing to the folder before you transfer it, or wait until it has finished saving.
- Schedule transfers for a quiet time, such as overnight, when fewer files are open. See Scheduling a transfer.
- Leave out folders that are always busy, such as an app's live logs or caches. Transfer the folders around them instead.
- For a folder you're moving to your external drive, Data Parking is usually the better tool; see when an app is holding a folder open for folders in use.
See also: Sync again and Run again · Copy, Move, Sync or Two-way sync · Data Transfers