From: Jan Svitok Date: 2006-07-27T18:14:51+09:00 Subject: Re: How to solve Windows PATH in Ruby?? Hi, just escape your backlashes, or use forward slashes (/). In my code I convert all paths tu unix style, work with them in that form, and just before calling windows I convert them back. It makes things much simpler. And in most cases even windows can handle forward slashes. J. On 7/27/06, zdk wrote: > require 'pathname' > p = Pathname.new("C:\ruby\samples\myFile") p = Pathname.new("C:\\ruby\\samples\\myFile") > dir = p.dirname > base = p.basename > puts base > > I just like to use "myFile",but p.basename seems not work on Windows > Platform. > > How to solve this kind of problem? > > any help or suggest would be greatly appreciated much. > Thanks a lot. > > Warachet S. > > >