@echo off
setlocal

:: Determine Stellarium user data directory
set "USER_STEL_DIR=%LOCALAPPDATA%\Programs\Stellarium"

:: Determine target scripts folder
set "TARGET_SCRIPTS=%USER_STEL_DIR%\scripts"

:: Create the scripts folder if needed
if not exist "%TARGET_SCRIPTS%" (
    echo Creating Stellarium scripts directory at "%TARGET_SCRIPTS%"
    mkdir "%TARGET_SCRIPTS%"
)

:: Move all .ssc files from batch’s folder to the target
echo Moving .ssc files...
move "%~dp0*.ssc" "%TARGET_SCRIPTS%"

:: Feedback
echo Done. Files moved to "%TARGET_SCRIPTS%".
pause

endlocal