title: Run Batch File In postgresql in single click
body: <p>Hello Experts I have made batch file to run query in postgresql it works fine after pressing enter key 4 times without typing. 1-server, 2 database, 3 port and 4 for password. I need this same result with single click.
  `</p>
  
  <pre><code>@echo off
  REM Copyright (c) 2012-2016, EnterpriseDB Corporation.  All rights reserved
  
  REM PostgreSQL server psql runner script for Windows
  
  cmd.exe /c chcp 1252
  
  SET server=localhost
  SET /P server="Server [%server%]: "
  
  SET database=naari
  SET /P database="Database [%database%]: "
  SET Password=pes
  
  SET port=5432
  SET /P port="Port [%port%]: "
  
  SET username=postgres
  SET /P username="Username [%username%]: "
  
  for /f "delims=" %%a in ('chcp ^|find /c "932"') do @ SET CLIENTENCODING_JP=%%a
  if "%CLIENTENCODING_JP%"=="1" SET PGCLIENTENCODING=SJIS
  if "%CLIENTENCODING_JP%"=="1" SET /P PGCLIENTENCODING="Client Encoding [%PGCLIENTENCODING%]: "
  REM Run psql
  "C:\Program Files\PostgreSQL\10\bin\psql.exe" -h %server% -U %username% -d %database% -p %port% -f e:\DELETE.sql
  pause
  </code></pre>
  
  <p>`</p>