<p>Google for the pgpass file. That's how I get around this. </p>
<div class="gmail_quote">On Nov 20, 2012 1:01 PM, "Mark Volz" <<a href="mailto:MarkVolz@co.lyon.mn.us">MarkVolz@co.lyon.mn.us</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am trying to create a batch program that will update postgis from a directory of shapefiles.  I came across <a href="http://suite.opengeo.org/opengeo-docs/dataadmin/pgGettingStarted/shp2pgsql.html" target="_blank">http://suite.opengeo.org/opengeo-docs/dataadmin/pgGettingStarted/shp2pgsql.html</a>, which uses psql to load data into postgis.  The psql command appears to prompt for a password, which would be fine if I was manually running the batch file.  However, I want to set up a scheduled task in windows so that my data gets updated on automatic intervals.<br>

<br>
Is there a way to store a password in a batch file such as " for %%f in (*.sql) do psql -p 5432 -w -U postgres --password mypassword --dbname postgis20 -f %%f?<br>
If not is there a way to trick a windows batch file to send the password to psql?<br>
<br>
Thanks for any help<br>
<br>
Mark Volz<br>
GIS Specialist<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</blockquote></div>