[Gambas-user] Hours of strugglin with EXEC and SHELL

Stefano Palmeri rospolosco at ...152...
Thu Jan 24 23:43:07 CET 2008


Alle 22:14, giovedì 24 gennaio 2008, richard terry ha scritto:
> Spent several hours struggling to no avail to understand the exec and shell
> commands including trying to dissect the console program supplied with
> gambas.
>
> Total frustration.
>
> I've selected a file/directory from a file box and that seems to work ok
>
>  PRINT FileChooser1.Dir
>  PRINT FileChooser1.Value
>
> The file is a zip file, and i want to unzip it in the same directory I
> selected i the box but, if and when (seems erratic) I can unzip it using
> this command:
>
> 	SHELL "unzip" & " " & "-P" & "password" & " " & FileChooser1.Value
>
> the unzipped files get deposited in my home directory. Also I want to be
> able to show them inside my terminal. (I tried the READ WRITE combinations
> at the end of that line).
>
> Then I tried things like
>
>
>            SHELL "cd  /home/richard/coding" WAIT
>            SHELL "ls -al" WAIT
>

Hi. 

You have to do:

SHELL "cd  /home/richard/coding; ls -al" WAIT

or

SHELL "ls -al  /home/richard/coding" WAIT

Bye,

Stefano



> and gambas just stops executin, or I tried copying from the console
> programs concepts.
>
>
>           ' $hProcess = EXEC ["ls"] FOR READ
>           ' $hProcess = EXEC ["cd", "/home/richard/temp"] WAIT
>
> Everything to no avail.
>
> I gave up after several hours, but to ease my frustration read 130 pages of
> the Gambas for Beginners pdf which I stumbled across at work today. Though
> based on version 1 it is very useful for me and to contribute to the Author
> I've ordered a paid copy.
>
> Regards and hopeful someone will be able to help me.
>
> Richard
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user




More information about the User mailing list