Menu

CLI command to create Temp folder

2025-12-20
2025-12-22
  • Danish Bronco

    Danish Bronco - 2025-12-20

    Hi everyone,

    I'm thinking about regrouping my Temp/Tmp folders and pagefile under the same roof instead of having two separate RAM disks.

    Since I'm running a .bat file that creates the RAM disk where the pagefile resides (the other is set via GUI), I'd like to know what commands I must add to it so that the disk is initiated, set to the proper size and file system, then points both user and system temp folders to it.

     
  • v77

    v77 - 2025-12-20

    Why not use the GUI?
    In the Advanced tab, there is a field "Run after mounting" that allows you to run anything just after the drive is ready. You could use swapadd in this field. With what you use in your previous topic, it would come to:
    "C:\Windows\System32\swapadd.exe" P:\pagefile.sys 256M 5G
    Just ensure that the correct full path to swapadd is present.

     
  • Danish Bronco

    Danish Bronco - 2025-12-22

    OK, thanks, I'll try that then.

     

Log in to post a comment.