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.