From 2331aa24dc30f7737f18003726d8e3324f30ac8c Mon Sep 17 00:00:00 2001 From: moshferatu Date: Mon, 23 Oct 2023 05:03:34 -0700 Subject: [PATCH] Update script to create NinjaTrader database folder if it doesn't exist already --- ram_disk.bat | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ram_disk.bat b/ram_disk.bat index ec8a748..1d35a8b 100644 --- a/ram_disk.bat +++ b/ram_disk.bat @@ -1,15 +1,17 @@ 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 if it doesn't exist. +if not exist %DriveLetter% ( + imdisk -a -s %Size% -m %DriveLetter% -p "/fs:NTFS /q /y" +) -REM Create the RAM disk. -imdisk -a -s %Size% -m %DriveLetter% -p "/fs:NTFS /q /y" - -:End \ No newline at end of file +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 +) \ No newline at end of file