Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Storing Binaries (Read 2468 times)
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: Storing Binaries
Reply #15 - Apr 13th, 2011 at 7:43pm
Print Post Print Post  
Is there a function or static that returns the working directory?
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Storing Binaries
Reply #16 - Apr 13th, 2011 at 8:17pm
Print Post Print Post  
jacker wrote on Apr 13th, 2011 at 7:43pm:
Is there a function or static that returns the working directory?


You shouldn't need one. The current working directory is always "here".  If you need to incorporate it into your path for some reason, you can use ".".

.\Data\Binaries

is the same as

Data\Binaries

If you really need the full path (and you shouldn't because that's the whole point of using relative paths) you can use @RedirectProcess to pick it up from the OS.

Code
Select All
var vDir as String

	vDir = @RedirectProcess("cmd /c cd", "")
	vDir = @Replace(vDir, @Chr(13), "")
	WriteLn(vDir)

 



Again, the point of using relative paths is that you can pick up the entire system and move it to a different machine or directory without needing to change your code at all.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print