windows-automation/ram_disk.bat

17 lines
507 B
Batchfile
Raw Normal View History

2023-09-18 13:25:07 +00:00
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 Create the RAM disk if it doesn't exist.
if not exist %DriveLetter% (
imdisk -a -s %Size% -m %DriveLetter% -p "/fs:NTFS /q /y"
)
2023-09-18 13:25:07 +00:00
REM Check if the "db" folder exists on the RAM disk and create it if it doesn't.
REM This is necessary for NinjaTrader to run properly.
if not exist %DriveLetter%\db\ (
mkdir %DriveLetter%\db
)