From: Chris Hulan Date: 2010-02-19T00:45:05+09:00 Subject: Re: Can SWIN CommonDialog.openFilename() select multiple files? On Feb 17, 2:44 pm, Alex DeCaria wrote: > Chris Hulan wrote: > > I followed the instructions in install.txt and it Just Worked! > > > Well the compile threw a bunch of warnings and the ended with a > > message > > about an error... but I was able to run the code for the dialog so I > > think you > > can ignore that > > > cheers > > Chris: > > SUCCESS!  I installed Ruby 1.9 and vrswin090207, and your code works as > advertised.  Apparently it can't be done with Ruby 1.8 and/or the older > version of vrswin. > > One final question.  Do you know how I can have the FileDialog open to a > predetermined directory, instead of the directory where the program is > started?  That's the last key to my puzzle.  I tried using a > Dir.chdir(mydirectory), but that didn't seem to work. > > --Alex > -- > Posted viahttp://www.ruby-forum.com/. Lookig at the swin code I think the 6th argument is the initial dir, so try this: SWin::CommonDialog::openFilename( nil, filetype_filter, OFN_EXPLORER|OFN_ALLOWMULTISELECT, 'Choose one or more files.',nil,"C:\ \some\\path")