[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to change directory of work?
[Thread Prev] | [Thread Next]
- Subject: Re: how to change directory of work?
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Sun, 13 Apr 2025 22:18:20 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Sun, 13 Apr 2025 at 21:28, <roberto.premoli@xxxxxxxxxx> wrote: > hello. > im writing a frontend with gambas to a program (no matter it now), lets call it "executable_cli". > This program is in /somewhere/path/to/program, in my case: "/home/user/path/to/program" > > so i use > > shell "/home/user/path/to/program" > > I do what i do into executable_ci, close it and back to frontend. all good till now. > > But the executable_cli suppose to find and save data in his current directory that is /home/user/path/to/program but frontend current directory is /home/user > > executable_chi cannot be parametrized with some flag to tell hime where save data and from where retrive data, it supposes always tht place is here it is in the filesystem and I cannot change the executable behaviour. > > so, from gambas, i try to do: > > shell "cd /home/user/path/to/program" > shell "/home/user/path/to/program/executable_cli" > > but i does not work > > exec ["cd /home/user/path/to/program"] does not work either. > > so, who to tell gambas to "move into" /somewhere/path/to/program? > > > Thanks > Roberto > there is no such thing as a "working directory" in gambas. every time you run Shell you create a new process so you cannot run "cd dir" in one Shell command then another Shell command be in that dir. You could do it in one single Shell command by using a newline.. Shell "cd /home/user/path/to/program\n" & "executable_cli" But you cannot change the applications working directory. BruceS
Re: how to change directory of work? | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
how to change directory of work? | roberto.premoli@xxxxxxxxxx |