--- /dev/null
+@ECHO off\r
+REM\r
+REM Script to create Bacula database(s)\r
+REM\r
+\r
+REM use SQL_ASCII to be able to put any filename into\r
+REM the database even those created with unusual character sets\r
+SET ENCODING=ENCODING 'SQL_ASCII'\r
+\r
+REM use UTF8 if you are using standard Unix/Linux LANG specifications\r
+REM that use UTF8 -- this is normally the default and *should* be\r
+REM your standard. Bacula consoles work correctly *only* with UTF8.\r
+REM SET ENCODING=ENCODING 'UTF8'\r
+\r
+"@SQL_BINDIR@\psql" -f "@bin_dir_cmd@\create_postgresql_database.sql" -d template1 %*\r
+IF ERRORLEVEL 1 GOTO :ERROR\r
+ECHO Creation of bacula database succeeded.\r
+EXIT /b 0\r
+GOTO :EOF\r
+\r
+:ERROR\r
+ECHO Creation of bacula database failed.\r
+EXIT /b 1\r