From: Gabriel Dragffy Date: 2007-09-27T21:37:05+09:00 Subject: Re: Recursing through directories On 26 Sep 2007, at 19:04, Andrea Fazzi wrote: >> >> Will this operate recursively? >> >> Many thanks >> >> Gabriel >> >> >> >> > > > > Yes. > > Dir['/Volumes/**/*'] will match the directories recursively. > > Bye. > Andrea > > Thank you for your help. I have a little trouble getting this script to operate properly and its given me an error I haven't come across before... Dir['/Volumes/**/*'].each { |file| File.move( file, gsub( /\//, "-") ) if File.file?( file ) } TypeError: $_ value need to be String (nil given) from (irb):4:in `gsub' from (irb):4 from (irb):4:in `each' from (irb):4 What might this mean? Many thanks Gabriel