"Dennis Mendelson" <nobody@home.org> asserted:
Should have mentioned that I have tried using double-quotes in the
following ways:"C:\Documents and Settings\test.txt"; and
C:\"Documents and Settings"\test.txt, both of which Windows
recognises.
Have you tried with no quotes within the String, like Daniel's example?
FWIW This works for me under WinXP/Cygwin:
Dave@telperion ~
$ ruby -ve "puts File.exists?('My Documents')"
ruby 1.8.2 (2004-12-25) [i386-mswin32]
true
Cheers,
Dave