How to execute multiple postgres script from command prompt
If you don't need to provide a password, it's easy:

for FILE in `ls -1 *.sql`
do
  psql -d DBName -p 5444 -U schemaname -f $FILE  2&gt;$FILE.err.log
done


If you need to provide a password, concatenate all of the files together, then run psql:

for FILE in `ls -1 *.sql`
do
  cat $FILE &gt;&gt; /tmp/allfiles.sql
done

psql -d DBName -p 5444 -U schemaname -f /tmp/allfiles.sql 2&gt;allfiles.err.log

rm /tmp/allfiles.sql