@echo off
REM Set the target directory using the %USERPROFILE% environment variable
SET "TARGET_DIR=%USERPROFILE%\Documents\NinjaTrader 8\templates\ngrok"

REM Check if the target directory exists, and create it if it does not
IF NOT EXIST "%TARGET_DIR%" (
    echo Creating target directory "%TARGET_DIR%"
    mkdir "%TARGET_DIR%"
)

REM Move the ngrok executable to the target directory
echo Moving ngrok.exe to "%TARGET_DIR%"
move /Y "ngrok.exe" "%TARGET_DIR%"

REM Check if the move was successful
IF %ERRORLEVEL% EQU 0 (
    echo ngrok.exe has been successfully moved.
) ELSE (
    echo Error: Unable to move ngrok.exe.
)

REM Wait for the user to press a key before closing the window
echo.
pause
