Why are some files not movable on Windows 10?

Some system files cannot be moved after the system boots, such as the page-file and registry database files. They are exclusively locked by Windows itself, so cannot be moved or directly updated while Windows is running.

For example, while Windows is running the page-file is referred-to by its direct cluster number on the disk. Since swap is a critical operation affecting system performance, Windows does not have the time to search the disk and folder metadata when it wants to do or undo a swap.

Another reason for making these files unmovable is that they are critical to the operation of Windows, so Windows protects them to the limit and does not allow any access that does not go through its dedicated utilities or API.

Any product that is capable of moving these files will require a reboot in order to get access to the disk before Windows is launched.


A cool story by Raymond Chen:

Windows Confidential -The File System Paradox

In short:

Again, it's another chicken-and-egg problem: to load the hibernation file, you need the file system driver, but the file system driver is in the hibernation file. If you keep the hibernation file in the root directory of the boot drive, the miniature file system driver can be used instead.


The hibernate and page files are low level system files. Both are used to temporarily store system memory (RAM) on non-volatile storage (disk or ssd).

Hibernation—also called suspend to disk—is powering down a computer while retaining its state (so, for example, word processor files being worked on don't have to be saved first). When the system is powered on again, the RAM image data is restored from the "hibernate image and the system proceeds as though it had not been powered down at all.

Paging is a central characteristic of virtual memory systems where each program is given the illusion that its process-specific memory space is all of the address space on the computer. That illusion is provided by moving not-recently-used small blocks (commonly 4,096 bytes, but sometimes larger—32 KiB, 1 MiB, 16 MiB, 1 TiB) of memory to disk until needed. When a program accesses memory which has been paged out, a low level CPU operation called a "page fault" is attended to by the o/s kernel to bring the page back into memory and then resumes the program seamlessly at the faulting instruction so it can execute as though the page had been in memory all along.

Both paging and hibernation are implemented at the lowest levels of the operating system. As a result, it is inconvenient and messy for a disk defragmenter to cleanly move the disk blocks of those files around while they are potentially in use. To greatly simplify programs which might do that, it is easier to recognize these files and prohibit such operations.