How do I know which folder my app was run from?

Linux specific forum
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

How do I know which folder my app was run from?

Post by Armoured »

Hi
with windows:

Code: Select all

a$=Space(999) : GetModuleFileName_(0,@a$,999) : appdir$=GetPathPart(a$)
with Linux? :?




Thanks
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

All OS, since PB 4.00:

Code: Select all

appdir$=GetPathPart(ProgramFilename())
quidquid Latine dictum sit altum videtur
Armoured
Enthusiast
Enthusiast
Posts: 365
Joined: Mon Jan 26, 2004 11:39 am
Location: ITALY
Contact:

Post by Armoured »

Thanks freak :)
Post Reply