From 0820edd18e9e8bb17ad22d3ec856d82f8c1c3f6c Mon Sep 17 00:00:00 2001 From: moshferatu Date: Mon, 18 Sep 2023 06:25:07 -0700 Subject: [PATCH] Batch script for creating a ram disk --- ram_disk.bat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ram_disk.bat diff --git a/ram_disk.bat b/ram_disk.bat new file mode 100644 index 0000000..ec8a748 --- /dev/null +++ b/ram_disk.bat @@ -0,0 +1,15 @@ +REM Run as administrator or else the disk will not be formatted. + +@echo off + +REM Set the desired drive letter and size for the RAM disk. +SET DriveLetter=R: +SET Size=10240M + +REM Check if the drive is already mounted. +if exist %DriveLetter% goto End + +REM Create the RAM disk. +imdisk -a -s %Size% -m %DriveLetter% -p "/fs:NTFS /q /y" + +:End \ No newline at end of file