Read in data from a file and replace the text using /replacetext./
urlfile= “C:\\printservers\\printurls.txt”
i=1
servermax = 4
File.open(urlfile, ‘r’) do |f1|
while line = f1.gets
result = {}
server,product1,durl,product2,lurl,product3,curl,product4,murl,product5,surl,product6,mpurl=
line.split(”,”)
while i <= servermax
server1 = server.gsub!(/print01-0./, “print01-0″+ “#{i}”)
f.puts “1. First verify server is up #{server1}”
$ie.goto(server1)
i= i+1
end
end
end

You must log in to post a comment.