rem Path bin postgre
set PATHPOSRGRESBIN=%ProgramFiles%\PostgreSQL\8.2.11-eter13\bin\
rem Name Database
set NAMEDATABASE=test
rem user database
set USERDATABASE=postgres
rem name of pathed backup file
set FILEPATCHED=BackUpPached.sql
rem Name psql log file
FILELOG=psqllog.log


"%PATHPOSRGRESBIN%dropdb" %NAMEDATABASE% -U %USERDATABASE%
"%PATHPOSRGRESBIN%createdb" -T template0 %NAMEDATABASE% -U %USERDATABASE%
"%PATHPOSRGRESBIN%psql" -o %FILELOG% -d %NAMEDATABASE% -f %FILEBACKUP% -U %USERDATABASE%
%pause