I’ve been plagued by the following error when copying small files to/from a NAS on my LAN using Windows 11 22H2.

0x80070026 Reached the end of the file.

There doesn’t seem to be a rhyme or reason to this. It’s on a TeraStation Pro II NAS. If I copy large files, no issue. Sometimes I can compress the file on the NAS into a ZIP and then copy it to my system.

I don’t think its an offline files cache issue: https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/access-offline-files-file-server-removed-from-network

Putting this here so I can come back and document my solution.

Test 1

If I create a share on my system as follows, I can copy the file to/from my NAS through the share.

mkdir c:\share
net share PUBLIC=c:\share /grant:everyone,FULL

Interesting to note: If I try to copy the file to c:\share\ again, it will error AND delete the existing file that was successfully copied.