Hi all,

I newbie in ruby and need create ruby script that find by all my images, such as:

Code:
<img src="images/image.gif" />
and transform to:

Code:
<img src="/layout/site/images/image.gif" />
but it only some images(that are in another folder)...

here the code I already make, I need suggestion how read file and replace <img> tag:

Code:
require 'fileutils'


def changeIMGEntry(imageFile)
		
	Dir["Z:/dir_jsp_for_change/*.jsp"].each do |fileJsp|
		
		puts fileJsp
		
		File.open(fileJsp).each do |line|
		
			puts line	
			
		end
				
		
	end

end

Dir["dir_image_for_change/*.gif"].each do |file|	
	
	changeIMGEntry(file)
	
end

someone have any idea ?