From: Peter Bailey Date: 2006-04-14T02:21:14+09:00 Subject: Re: File basenames using File.basename . . . Berger, Daniel wrote: >> -----Original Message----- >> From: list-bounce@example.com >> [mailto:list-bounce@example.com] On Behalf Of Peter Bailey >> Sent: Thursday, April 13, 2006 5:57 AM >> To: ruby-talk ML >> Subject: Re: File basenames using File.basename . . . > > > >> Thanks, Dan. Both of your suggestions worked for me. Now, how could I >> fulfill my instructions in the filesystem itself, not just in >> the array? >> I know I can do it with a system("ren *.txt *."), but, how >> would I do it >> in RUBY? > > To rename individual files, use File.rename. For batches of files I'm > not sure off the top of my head, but I'm guessing there's a method in > either FileUtils or ftools. > > Regards, > > Dan Makes sense. Thanks. -- Posted via http://www.ruby-forum.com/.