From: michael Date: 2006-08-09T23:10:11+09:00 Subject: Re: uploading local file into text_field using watir first of all, thank you for the suggestion.. now what if I wish to save the file in C:\ directory, with the file name of 1.htm.. how do I change the code you have suggested?? what change do I make to the code to save it as c:\1.htm?? thanks. michael.. Patrick Spence wrote: > 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/.