Error 0x80270113 is yet another mysterious Windows error that Microsoft doesn’t explain well. First, some background:
OneDrive for Windows 8.1 supports online-only files. It’s a great idea: these files look normal, but they take up almost no space on your hard drive. If you right-click on an online-only file and select Properties, you’ll see that the Size on disk field is just a few bytes. That’s because only a stub stays on your hard drive. If you open the stub file, OneDrive transparently downloads the full copy. In theory, it’s a great way to share files across multiple devices that may not have enough drive space to copy all of them locally. (Even though it’s a neat idea, Microsoft is ditching online-only files for Windows 10.)
Now here’s where the error comes in: error 0x80270113 apparently happens when Windows doesn’t know how to open one of these OneDrive stub files. Here’s how it happened to me:
I am quitting OneDrive because it’s slow. I have several gigabytes of files in OneDrive. Moving those files to another place on my hard drive should be a fast cut and paste operation. In a classic file move, the file’s contents aren’t actually moved. Rather, a few bytes of filesystem data is tweaked to tell Windows that the file is in a new place. It’s like adjusting highway signs to tell people a new route to a city. You don’t move the entire city, you just tweak a few signs.
Not with OneDrive! Even if you aren’t using online-only files, moving files in or out of your computer’s OneDrive folder is a pokey copy-and-delete operation. With this, a copy of the file is made in the destination location, then the file is deleted from its source location. This is exponentially slower than a move.
As I have many gigabytes of files to move, I got impatient on the long wait. I stopped the move, shut down OneDrive, and used PowerShell’s Move-Item command to do a classic file move operation.
Oops! Move-Item isn’t aware of OneDrive, so it happily moved the file stubs without downloading them first. I didn’t realize that only the stubs were moved until I later tried to load some of these files, hence the 0x80270113 error! I think the error means is that you have a stub file outside of its OneDrive direcotry, and Windows doesn’t know how to deal with it.
To make things worse, after I moved all these files out of OneDrive, the OneDrive agent synchronized my now empty OneDrive folder, which caused all the online copies of the files to be deleted. (That is correct behavior. If you get rid of a file locally, it should also be removed from the online drive.) Unfortunately, I was left with only stub files on my hard drive and an empty OneDrive.
Luckily, OneDrive has a Recycle Bin. I restored everything from the online Recycle Bin back into OneDrive. My local OneDrive agent then set up online-only stubs of all these files. Now I can use the Windows Explorer’s cut and paste feature to move these files out of OneDrive. I’m pasting them in the same location where I moved the files using Move-Item. With this operation, I am telling Windows Explorer to overwrite the files in the destination. This overwrites the tiny stubs with actual data.
At this point, you may ask, “Why did you move your files using Move-Item if you had set them to be online-only?” Good question. Answer: I never set any files to be online-only on this computer! I don’t know why that happened. All I can guess is either:
- OneDrive does this intentionally for some files.
- OneDrive bug.
- I had the OneDrive client running on two other PCs, and on both those other PCs, I set them to use online-only file copies. Perhaps OneDrive somehow carried that setting over to my main computer.
Regardless of why, this is a pain to deal with. I’m very fortunate that OneDrive’s Recycle Bin actually works!