Postgres dev create database script for Windows 10

Here is the create database script I use for my Java project that uses a postgres database. This script is a Windows batch file.

@echo off
rem Optionally change to the working directory
rem cd c:\users\Me\Desktop

echo.
echo This will drop and create the mydb-prod database using an export from PROD
echo The export file, mydb-prod.sql, must exist in the current directory
echo Optionally, user roles in roles.sql will be applied if found
echo.
echo To export the db:
echo.
echo     pg_dump -h localhost -p 7000 -U postgres -W mydbprod ^> mydb-prod.sql
echo.
echo To export user roles:
echo.
echo     pg_dumpall -h localhost -U postgres -p 7000 ^> roles.sql
echo.
echo *****************************************************************
echo *                                                               *
echo * IMPORTANT!                                                    *
echo *                                                               * 
echo * Database mydbprod must be disconnected before proceeding.      *
echo *                                                               *
echo *****************************************************************
echo.

if exist mydb-prod.sql (
    echo Database export, mydb-prod.sql, found. Continuing...
    echo.
) else (
    echo File "mydb-prod.sql" not found in current directory. Exiting.
    echo.
    exit /b
)

set "PGPASSWORD="
set /p PGPASSWORD="Enter postgres password: "

rem IF not defined %PGPASSWORD% 
rem IF [%PGPASSWORD%] == [] 
IF ["%PGPASSWORD%"] == [""] (
    echo Password cannot be blank. Exiting.
    echo.
    exit /b
) 
rem echo %pgpassword%

if exist roles.sql (
    echo.
    echo User roles in roles.sql will be applied
    echo.
)

echo.
echo Dropping database...
echo.
dropdb -p 7000 -U postgres -h localhost mydbprod

echo.
echo Creating database...
echo.
createdb -p 7000 -U postgres -h localhost mydbprod

if exist roles.sql (
    psql -p 7000 -U postgres -h localhost -f roles.sql
)

psql -p 7000 -U postgres -h localhost mydbprod < mydb-prod.sql

REM wrap-up sql not included in db export
psql -p 7000 -U postgres -h localhost -d mydbprod -c "set search_path=fw,public; GRANT SELECT ON pg_authid TO application;"
 
:END