Hello,

I want to make a program that transfers a lot of files to another computer
by means of FTP. I want to check if the target directory exist. I want to do
a chdir, and if I retrieve a status indicating the directory doesn't exist,
I want to issue a mkdir command.

When I issue a chdir (or even a list) on a non existing file, Ruby stops:
V:/RUBY/lib/ruby/1.6/net/ftp.rb:129:in `getresp': 550 /abc: The system
cannot find the file specified.  (Net::FTPPermError)
        from V:/RUBY/lib/ruby/1.6/net/ftp.rb:137:in `voidresp'
        from V:/RUBY/lib/ruby/1.6/net/ftp.rb:298:in `retrlines'
        from V:/RUBY/lib/ruby/1.6/net/ftp.rb:285:in `mon_synchronize'
        from V:/RUBY/lib/ruby/1.6/net/ftp.rb:285:in `retrlines'
        from V:/RUBY/lib/ruby/1.6/net/ftp.rb:447:in `list'

How can I avoid this stopping, and getting the status in my program?

I'm using Ruby 1.6.6 on Windows2000.

Kind regards,

John Jenniskens