From: Joel VanderWerf Date: 2008-02-19T05:08:11+09:00 Subject: Re: Write a copy of the current script dkmd_nielsen wrote: > On Feb 18, 1:07 pm, Joel VanderWerf wrote: >> 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 > > I tried that. I got the dataset name and that's it. Is it an O/S > thing? What do you mean by dataset? What OS are you using? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407