From: "Amit , Pathak (IE10)" Date: 2003-04-30T19:05:43+09:00 Subject: pwd equivalent in DOS Hi, I need to retain the present working directory(pwd) information( in DOS) into a variable to be used later in a batch file. say something like set d = pwd then, cd %d% can you tell me how to achieve it in DOS. your command below d= Dir.pwd does not work for me on win2k/dos. Thanks, Amit Subject: Re: ms-dos calls on Windows? and/or, getting working directory? From: "Victor Manuel Reyes Viloria" Date: Sat, 20 Apr 2002 05:40:26 +0900 The following works for me under windows/2000 dos shell. d = Dir.pwd Victor |---------+----------------------------> | | "Brian Denny" | | | | | | | | | 04/19/2002 04:29 | | | PM | | | Please respond to| | | ruby-talk | | | | To: ruby-talk@ruby-lang.org (ruby-talk ML) cc: Subject: ms-dos calls on Windows? and/or, getting working directory? hi... on Unix, you can do something like, foo = `pwd` the equivalent on Windows (foo = `cd`) seems not to work. is there some way i can make an ms-dos shell call? or does it have to be a "system call", ie Win32 API? actually, all i'm trying to do at the moment is get the current working directory from within ruby, so if i'm totally barking up the wrong tree and there's another simple way to do it, please let me know. thanks, -brian