From: Tushar Gandhi Date: 2009-04-06T16:57:34+09:00 Subject: Re: File copy Hi, I write the code like this " browser=Watir::IE.new browser.visible=false browser.goto(params[:photo_url]) idx = 0 # using the images collection, iterate through all of the images on a page browser.images.each do |x| idx += 1 # apparently the string accepted by the string method will not allow variable substitution original_type= x.src[-4,4] type=".gif" if original_type == ".gif" type=".jpg" if original_type == ".jpg" type=".png"if original_type == ".png" type=".bmp" if original_type == ".bmp" type="jpeg" if original_type == ".jpeg" x.save('/images/') end " I am getting an error " The AutoIt dll must be correctly registered for this feature to work properly " How to resolve this? Thanks, Tushar jazzez ravi wrote: > >> I know that this is not a directory path. Is any one knows how to copy >> this file? > > Hi Gandhi, > > Try this code which is mentioned in my blog > > http://raveendran.wordpress.com/2009/04/06/save-images-from-any-url/ > > > Regards, > P.Raveendran > http://raveendran.wordpress.com -- Posted via http://www.ruby-forum.com/.