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

richard terry rterry at ...1822...
Fri Jan 25 03:23:49 CET 2008


Thanks for your suggestions, I think maybe I didn't make myself entirely 
clear.
Yes the SHELL Commands did work as per your suggestion (as did mine), but even 
if the output of cd ...... etc ls -al prints the listing of the directory, 
the cd command dosn't change the working directory of the unzip command, ie 
the unzipped files are deposited in my home directory, not the directory I 
shelled to.

Obviously I am missing something.

Maybe another suggestion?

Richard

On Fri, 25 Jan 2008 09:43:07 am Stefano Palmeri wrote:
> 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
>
> -------------------------------------------------------------------------
> 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