[erlang-questions] Current working directory

Adam Lindberg <>
Wed Apr 16 09:09:02 CEST 2008

Hi all!

I'm writing an escript and is trying to figure out which directory
it's being run in. However, I can't seem to find a function to get the
current working directory (pwd on *NIX) in Erlang. There is one in the
module 'c', but it just returns 'ok' and prints the directory instead
of returning it! How can I get the current working directory in

Adam Lindberg

More information about the erlang-questions mailing list