From: Patrick Spence Date: 2006-08-09T22:24:50+09:00 Subject: Re: uploading local file into text_field using watir michael wrote: > Matt.. > > Thanks you so much.. It works beautifully.. > > Now as I have stated in my previous posting, I have many hundreds of > these files to upload.. > > the files are named as email1guide.htm, email2guide.htm.. > email3guide.htm.. and so on.. like this.. > > Would you please tell me the way to iterate these postings in one > setting rather than doing one by one a couple of hundreds times?? > > thanks. > > > grateful, michael #-- assuming all files you want to find start with "email" and have #-- an ".htm" extension files = Dir.glob("email*.htm") #-- interate thru list of files files.each {|file| #-- this is where you'd do what you need with the file, for now #-- we're just displaying the name of the file puts(file) } -- Posted via http://www.ruby-forum.com/.