One line sample: auto currDir = getcwd(); On forum: about getcwd - http://forum.dlang.org/thread/pnuxfheeaqwyfjdqwyzw@forum.dlang.org about dirEntries and absolutePath - http://forum.dlang.org/thread/snegkdvgmutgvxnijjfp@forum.dlang.org As I assume, all related errors come from bugs in std.utf (or something that used in this module) because: string cwd() { import core.sys.windows.windows; wchar[] ret = new wchar[10240]; auto n = GetCurrentDirectoryW(to!DWORD(ret.length), ret.ptr); return ret[0 .. n].to!string(); } works good on both Win 32 and Win 64. Win 8 Pro 64 bit Dmd 2.062 Visual Studio 2012 Express.
*** This issue has been marked as a duplicate of issue 9677 ***