From: Stefano Crocco Date: 2007-08-23T20:54:52+09:00 Subject: Re: Renaming Files Alle gioved� 23 agosto 2007, Gabriel Dragffy ha scritto: > Just another quicky, if I wanna rename all the files in the directory � > is what I did OK, using: > ��������next if f=="." or f==".." > > I just feel there must a better way? If you want to rename only files, then you should do next unless File.file? f This way, you skip not only the given directory and its parent, but also any directory inside the current. If you're sure the given directory contains only files, then you're approach and mine should be equivalent (although, in my opinion, mine makes clearer why you're skipping those entries). Stefano