From: paul h Date: 2011-04-07T23:30:42+09:00 Subject: Re: Windows directories not recognized by ruby? On Apr 7, 3:03 pm, "Kalman H." wrote: > What's wrong with this code? > > C:\>mkdir test_ruby > > C:\>irb > irb(main):001:0> File.directory? "c:" > => true > irb(main):002:0> File.directory? "c:\test_ruby" > => false > irb(main):003:0> > > Thanks for any ideas in advance, > > -Kalman > > -- > Posted viahttp://www.ruby-forum.com/. It's the way Ruby handles your strings. You are using double quotes, so you need to escape the backslash. If you use single quotes, you can use the single backslash. Look at the following: irb(main):001:0> File.directory? "C:" => true irb(main):002:0> File.directory? "C:\Users" => false irb(main):003:0> File.directory? "C:\\Users" => true irb(main):004:0> File.directory? 'C:\Users' => true HTH Paul