You can moveswapfile.sys
by disabling paging file and then creating a symbolic link at C:\swapfile.sys
(assuming C: is your system drive). Whole procedure can be performed in Windows environment.
The following steps will disable swapfile.sys
(tested on Windows 8 and Windows 8.1 Preview):
- Disable page files on all drives (through Control Panel -> System and Security -> System -> Advanced system setting -> Advanced -> Performance Options -> Advanced -> Virtual memory).
- Restart your computer.
swapfile.sys
should be gone now. If it's still present, it may be deleted manually.
Afterwards enter following command in command line (requires administrative privileges):
mklink C:\swapfile.sys "<NEW LOCATION>:\swapfile.sys"
If new location path doesn't contain spaces, quotes can be omitted. Note that in Windows PowerShell (which is promoted in Windows 8.1) mklink
command is not accessible. You should call regular command line by typing cmd
and then proceed in the same window.
After that you can enable pagefile and newly created swapfile.sys
will be located wherever the symbolic link points to. The symbolic link itself occupies minimal possible disk space.