Re: current_dir()
- Posted by Jules <jdavy at dsl.pip?x.?om> Aug 08, 2007
- 587 views
Juergen Luethje wrote: > > Jules wrote: > > <snip> > > > Thanks Don, but it didn't make any difference. Actually, I'm a little > > confused > > about what current_dir() refers to, because you can have more than one > > "current > > directory". On XP and Linux you could have any number of shells open, each > > one > > running from a different directory. I thought that current_dir() gives you > > the > > dir which the Eu program is running from. > > > > Please could someone set me straight on this? > > When you open a command window (console) on Windows, and it shows say > C:\Programs> > then "C:\Programs" is the current directory. The definition of the > current directory has nothing got to do with the question where your > Eu program is located. I think it's the same on Linux. > > When your program "my.exw" is located in the current directory, then > the command-line for starting it can be as simple as: > exw my.exw > When your program is _not_ located in the current directory, then > you have to pass its full pathname (surrounded by quotes if it contains > spaces) to the Eu interpreter, e.g. > exw "D:\my files\test\my.exw" > > Regards, > Juergen Ok thanks Juergen. I was trying to write a program which would "find itself" as it were, and I thought current_dir() would be a way to do it. But going back to my point about consoles (sticking with Windows), I can open a console and CD to c:\euphoria, then open another and CD to c:\windows... so which is the current directory in this case?