I need to loop from DOS [sic] on a set of files to get them imported into a table. I noticed that psql is wrapped up in a import.bat I wrote another bat that substantially do rem import.bat FOR %%f in (pattern) do "longpathtopsql.bat" --variable csvfile=%%f -f some.sql -- some.sql \copy import.transaction from :csvfile but I get some.sql:3: :csvfile: No such file or directory I tried -v --set etc... Same result. How can I pass variables to a sql script? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general