From: Nobuyoshi Nakada Date: 2007-06-13T14:13:21+09:00 Subject: Re: File.exists? ignores file extension on windows? Hi, At Wed, 13 Jun 2007 03:15:03 +0900, Luke Bayes wrote in [ruby-talk:255365]: > I was able to faithfully reproduce the problem as follows: > > FileUtils.touch('fcsh.exe') > puts "exists?: #{File.exists?('fcsh')}" > > # exists?: true You use cygwin. $ rm -f fsch $ touch fsch.exe $ ./i386-cygwin/ruby.exe -e 'p File.exist?("fsch")' true $ ./i386-mingw32/ruby.exe -e 'p File.exist?("fsch")' false $ test -f fsch; echo $? 0 $ cmd /c "if exist fsch (echo exist) else (echo not exist)" not exist -- Nobu Nakada