> thanks for your reply, I believe i understand, however I dont know how > to make C:\Program Files\@Last Software\SketchUp 5\Materials the current > directory in the program. Dir.chdir "c:/Program Files/..." - use Dir.pwd to see where you are. > Or how to make an option where the user can > type in, or browse to their own directory. For instance like this: dir=gets # get user input from stdin Dir.chdir dir # move to specified directory img=Dir["*.jpg"] #get array of all jpg files puts img # print the filenames, one per line > But on the string answer of your question: > img.each do |img| > p img > end > > Does that mean that p will be a variable that will hold all the image > names? Nope. 'p' is a print command. 'img' is the variable that holds the image names. Have a look at the documentation and some programming guides (ex. http://www.ruby-doc.org/docs/ProgrammingRuby/) , and use irb for experimentation. Good luck. jf