From: Rob Biedenharn Date: 2010-01-12T03:40:18+09:00 Subject: Re: File::exists?( "filename with a blank in it" ) On Jan 11, 2010, at 1:30 PM, Ralph Shnelvar wrote: > Newbie here/ > > Consider > > IMAGEMAGICK_EXE_PATH = '"f:\Program Files\ImageMagick-6.5.8- > Q16\convert.exe"' > > (rdb:2) File::exists?( IMAGEMAGICK_EXE_PATH ) > false > > What's the right way to test if a file name which has a blank in it > exists? Well, probably to NOT put the quotes into the filename. IMAGEMAGICK_EXE_PATH = 'f:\\Program Files\\ImageMagick-6.5.8-Q16\ \convert.exe' or IMAGEMAGICK_EXE_PATH = 'f:/Program Files/ImageMagick-6.5.8-Q16/ convert.exe' (yes, Ruby's File class will work just fine with / as the directory separator even on Windows.) -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com