From: Michael Linfield Date: 2009-03-15T07:25:02+09:00 Subject: Re: Daemons and Paths I don't know if this is exactly what your looking for, but how about a call to locate? begin #worker code here rescue path = %x[locate ].chomp! #the filename would be whatever the daemon is #looking for - you take the error code from #the daemon and pull the filename out of it #Here we are going to take the path output #then remove the last array element it's #split by, aka the filename, so that u will #have the directory directory = path.split("/") directory.pop directory.join("/") Dir.chdir(directory) retry #retries the begin block end -- Posted via http://www.ruby-forum.com/.