From: Ryan Gifford Date: 2008-03-22T00:08:28+09:00 Subject: File.exist? behavior problem/question I am getting strange behavior running the following test case: 1. Create a file on filesystem (created D:/auz.dat) 2. Check to see if the created file exists by running File.exist?("D:/auz.dat") 3. The code returns True 4. Run File.exist?("D:/aux.dat") (this file does not exists and should return false) 5. It returns True. The only file that should exist is auz.dat. Looking for auu.dat or other variations do not consistently return false and looking for aux.dat falsely returns true every time. File.file? seems to act the same. I am new to Ruby and am seeing this behavior in windows (one-click install) on any version higher than 1.8.2. On 1.8.2 it behaves as I think it should. I am currently using 1.8.5 and cannot recreate this behavior in linux - it seems to be specific to the windows installs I have tried it on. So any feedback would be appreciated - it could just be something simple I am doing wrong. Thanks in advance. (small test I wrote for this) # def FileExists fileToTest = "D:/aux.dat" puts 'Checking for file: ' + fileToTest if File.exist?(fileToTest) puts 'file is there' else puts 'file not found' end # end -- Posted via http://www.ruby-forum.com/.