From: Joel VanderWerf Date: 2008-02-19T04:07:07+09:00 Subject: Re: Write a copy of the current script dkmd_nielsen wrote: > I would like to write a copy of the current script being executed. > I've attempted to use __FILE__ and $0, but neither is returning the > full path name of script. I get the file name, but not the path in > which it resides. Anyone have a quick solution? > > def initialize > @script = $0 # Save where the script is from > puts "[#{@script}]" > end > > returns "[AAN_StandardSetup.rb]" File.expand_path(__FILE__) File.expand_path($0) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407