[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: how to change directory of work?


Le 14/04/2025 à 13:51, Benoît Minisini a écrit :

Otherwise you can actually specify the working directory in Exec or
Shell by specifying it the "PWD" environment variable.

Exec ["pwd"] With ["PWD=/root"] Wait

It's an undocumented Gambas feature.

Regards,

-- Benoît Minisini.



Hello Mr. Minisini,
i tried this:

   Message(User.home) 'test: it prints "/home/utente"
   Exec ["pwd"] With ["PWD=/home/utente/Immagini"] Wait
   Message(User.home) 'test: it prints "/home/utente"

but user.home in not affected.

Thnks,
Roberto


It's the working directory of the program executed by Exec that is set by "PWD=...".

'User.Home' is your home directory. It's completely unrelated, and you can't change it.

Regards,

--
Benoît Minisini.


References:
Fwd: how to change directory of work?Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>