Maybe this is a linux thing?
I discovered today that I can't change the application working directory.
I have project that needs to wander around a set of related directories and process the files therein. Tracking where I am is proving @#! difficult. So thought I what about changing the working directory, then the relative paths would be simple. This appears to be "not possible" AFAICS.
Any thoughts/
gracias
b
Change the working directory not possible
Change the working directory not possible
Have you ever noticed that software is never advertised using the adjective "spreadable".
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Change the working directory not possible
I would create a new folder as your 'working directory' e.g.I have project that needs to wander around a set of related directories and process the files therein.
Public sPath As String = User.Home &/ "MyNewFolder"
Public Sub Form_Open()
If Not Exist(sPath) Then Mkdir sPath
End
Then you can create new folders and move around them with ease using sPath as the 'root'.
Or have I missed something here?
Re: Change the working directory not possible
...perhaps you could use the external function "chdir()" via Gambas "Extern" keyword:
https://pubs.opengroup.org/onlinepubs/9 ... chdir.html
https://man7.org/linux/man-pages/man2/chdir.2.html
https://pubs.opengroup.org/onlinepubs/9 ... chdir.html
https://man7.org/linux/man-pages/man2/chdir.2.html
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
Re: Change the working directory not possible
(still looking at both these ideas. I'll let you know.)
Have you ever noticed that software is never advertised using the adjective "spreadable".