From: MonkeeSage Date: 2006-10-01T08:25:11+09:00 Subject: Re: getting the name of the script in use Une b�vue wrote: > yes ! i knew File.basenamepath)... I know...I saw your first post. But that seems very direct to me. I think you meant immediate, i.e., without calling a method. There is no way to do that, that I know of anyway, but you can always do it yourself (you could even make a file just for that): ### direct.rb ### $base = File.basename($0) ### somethingelse.rb ### require 'direct' puts $base I do something similar to find the real path of a script: ### realpath.rb ### # This basically does the same thing as: # require 'pathname' # File.dirname(Pathname.new($0).realpath) $realpath = File.expand_path($0) if File.symlink?($realpath) $realpath = File.readlink($realpath) end $realpath = File.dirname($realpath) ### somethingelse.rb ### require 'realpath' puts $realpath Regards, Jordan