Windows 8 and 8.1 Forums


Is it possible to move swapfile.sys to a different volume?

  1. #1


    Posts : 220
    Windows 8.1 Pro X64

    Is it possible to move swapfile.sys to a different volume?


    Acting on the assumption that the extended start up times I am experiencing (almost 5 minutes from entering pin or password until START screen appears) might be due to disk fragmentation I decided to defrag my Windows drive.
    Of course a major obstacle in that exercise is the pagefile so I decided to set up a page partition on the disk that I use for online backups and file history since that disk is lightly used.
    All well and good but then I spot SWAPFILE.SYS which apparently always gets on to the Windows drive no matter where the pagefile is located.
    How can I move that file to another location?

      My System SpecsSystem Spec

  2. #2


    Posts : 220
    Windows 8.1 Pro X64


    Found the answer:-

    Virtual Memory Paging File - Change

    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):

    1. Disable page files on all drives (through Control Panel -> System and Security -> System -> Advanced system setting -> Advanced -> Performance Options -> Advanced -> Virtual memory).
    2. Restart your computer.
    3. 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.
    Last edited by Brink; 31 Oct 2013 at 12:00. Reason: added tutorial link for more info
      My System SpecsSystem Spec

  3. #3


    Posts : 3
    Windows 8.1


    Quote Originally Posted by Hairy Scot View Post
    Found the answer:-
    ...
    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.
    I can confirm that this method works. I was suspicious because the link points to a page about moving pagefile.sys, not swapfile.sys. It is a mystery to me why forbidding pagefile.sys on all drives also caused swapfile.sys to disappear; but it did. The symbolic link worked.

    Now my pagefile.sys and swapfile.sys lie on a small partition separate from the C: drive (but still on SSD). (I just thought it was silly to be including these files in backups.)
      My System SpecsSystem Spec

Is it possible to move swapfile.sys to a different volume?
Related Threads
Mic volume too low in Sound & Audio
Hey is there any way to increase the mic volume besides the one in the controll panal thing? I maxed everything out but it's still not enough ;(...
Solved c:\swapfile.sys in Performance & Maintenance
Another swapfile, in addition to pagefile.sys seems to have appeared in Windows 8, in the root directory. At 262,144 KB, it seems large enough for a memory dump. Does anyone know anything about it?
I'm using a Logitech 35 headset on Windows 8.1 64-bit and all drivers are updated but when i want to adjust the volume, the volume mixer becomes unresponsive and stops working and my headset stops receiving sounds.
Solved Pagefile / swapfile? in Performance & Maintenance
I know a little about pagefiles and such.. but not as much as i want, atm, I currently Restored my system back to factory settings, out of the 8GB of RAM I have.. I'm using 5431MB used, 6562MB avaliable, is there any way to pretty much delete the page file and keep it low?
Solved Missing Pagefile, Swapfile, hiberfile. in Performance & Maintenance
I installed 8.1 upgrade to Win7. On checking SSD C: there is no sign of those filess. I can't remember if I had them in Win 7. How do I install them? I have 16GB of DDR3 memory
Hello Guys, this is my first post on eightforums, i recently got a new laptop "asus vivobook" that came preloaded with windows 8. The laptop comes with a hybrid 24 GB ssd (8GB of those are for the system files,windows 8 is installed on,the remaining are in a 2nd partition for recovery) i...
Hello all, I have a set of computers in a small business running win 8 pro volume licenses. I noticed that the store doesn't seem to offer 8.1 as an update for these licenses. I even got a pop-up on one computer that asked me to upgrade, took me to the store, and left me hanging without an...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook