From: Sam Fent Date: 2007-03-15T01:09:54+09:00 Subject: Re: Copying files and changing their names Stefano Crocco wrote: > > NOT TESTED - make a trial with some useless directory before using it on > real > data > Hi Stefano (anzi, 'ciao!'), Thank you very much -- that has helped me tremendously. I have one further question though. What if, instead of the number "9", I wanted to copy the file with the HIGHEST number. For example, my files might be example1.txt example2.txt test1.txt test2.txt test3.txt If I wanted to change example2.txt to example-final.txt, and test3.txt to test-final.txt, how could I iterate throught the files to find the file with the highest number? Grazie mille per qualsiasi aiuto, Sam -- Posted via http://www.ruby-forum.com/.