From: Bee Tard Date: 2008-10-29T02:53:09+09:00 Subject: createing directories and moving files into it I have an undetermined list of directories. I am trying to loop through them all and in each one I want to make a directory called 'images'. when i do this, I want o move all the imagges in that folder into it. so i have a tree like this: some-dir \_abc - img00971273.jpg - img21234235.jpg - img12345623.jpg \_123 - img99554361.jpg - img21234235.jpg - img53840534.jpg \_xyz - img00930443.jpg - img12364235.jpg - img09982623.jpg \_890 - img00923871.jpg - img21292835.jpg - img08836823.jpg I would like to create some-dir \_abc \__images - img00971273.jpg - img21234235.jpg - img12345623.jpg And so on and so forth. Hope this illustration makes sense. I have tried to create a loop and go through each directory and use system() to 'mkdir images' and mv *.jpg /images no luck as yet. really starting to like some of Ruby's fileutils. just wish i could get moving with some of these tasks :) All help greatly appreciated. I'll buy you a beer at lunch. -- Posted via http://www.ruby-forum.com/.