From: Daniel Berger Date: 2007-06-13T04:10:15+09:00 Subject: Re: File.exists? ignores file extension on windows? On Jun 12, 12:10 pm, Luke Bayes wrote: > I just wanted to check in with an issue I ran into last night. > I was able to faithfully reproduce the problem as follows: > > FileUtils.touch('fcsh.exe') > puts "exists?: #{File.exists?('fcsh')}" > > # exists?: true I cannot duplicate this with Ruby 1.8.5 (one click) or 1.8.6 (VC++ 8) on Windows XP SP2. irb(main):002:0> VERSION => "1.8.6" irb(main):003:0> FileUtils.touch('test.exe') => ["test.exe"] irb(main):004:0> File.exists?('test') => false irb(main):005:0> File.exists?('test.exe') => true irb(main):006:0> File.delete('test') Errno::ENOENT: No such file or directory - test from (irb):6:in `delete' from (irb):6 irb(main):007:0> File.delete('test.exe') => 1 Regards, Dan