Change the working directory not possible

Post

Posted
Rating:
#1 (In Topic #1058)
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 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

Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
I have project that needs to wander around a set of related directories and process the files therein.

I would create a new folder as your 'working directory' e.g.

Code (gambas)

  1. Public sPath As String = User.Home &/ "MyNewFolder"
  2.  
  3. Public Sub Form_Open()
  4.  
  5.   If Not Exist(sPath) Then Mkdir sPath
  6.  
  7.  

Then you can create new folders and move around them with ease using sPath as the 'root'.

Or have I missed something here?
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
vuott is in the usergroup ‘Regular’
:? …perhaps you could use the external function "chdir()" via Gambas "Extern" keyword:

chdir
chdir(2) - Linux manual page

Europaeus sum !

<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 (still looking at both these ideas. I'll let you know.)

Online now: No Back to the top
1 guest and 0 members have just viewed this.