[Gambas-user] Concept needed for shell + transforming files > postges

Jacky jscops at ...11...
Thu Jan 24 06:43:21 CET 2008


Le Thursday 24 January 2008 04:26:15 rterry at ...1822..., vous avez écrit :
> Some of this I can do already, but I'm not sure how to combine the flow.
>
> I want to be able to update quite a large reference database in postgres
> from downloaded files and import into postgres.
>
> I can do this already manually ie, download, unzip, run a script file in
> the terminal, delete existing tables, import, run functions in postgres via
> terminal script to modify the data etc.
>
> In gambas I can:
>
> 1) design form (wizard) and start with file window to locate and select
> file
>
> 2) Next step would be to take the file and unzip say using:
> 	unzip -P "password" file.zip
>
> I guess I would use the shell command, but can't understand the docs on how
> to say see the output in a control within my gambas program.
>
> 3)Next step using psql etc I should be able to do if someone could help me
> with the syntax/directions for step 2).
>
> Thanks in anticipation
>
> Richard

Salut Richard

Try this.

shell "unzip" & " " & "-P" & "Password" & " " & "file.zip"

No test but i think that work.

Jacky





More information about the User mailing list