From: 7stud -- Date: 2007-10-16T12:43:22+09:00 Subject: Re: Newbie question - how to get current directory into a va Peter Vanderhaden wrote: > Thanks Tim. the Dir.pwd is exactly what I need. I haven't figured out > how to use the Dir.chdir yet, but that looks promising too. p Dir.entries(".") #array containing files in current directory puts Dir.chdir("../") #relative path p Dir.entries(".") puts Dir.chdir("/Users/me/Documents/ruby") #absolute path p Dir.entries(".") -- Posted via http://www.ruby-forum.com/.