From: Arup Rakshit Date: 2013-02-01T02:39:57+09:00 Subject: Re: How to copy the directory files only to another directory? tamouse mailing lists wrote in post #1094586: > On Wed, Jan 30, 2013 at 10:11 AM, Arup Rakshit > wrote: >> irb(main):002:0> Dir.pwd >> => "C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby" >> irb(main):003:0> Dir.glob('**/*.*') >> => ["Books/Beginning Ruby.pdf", "Books/Russ Olsen Eloquent Ruby.pdf", >> "Books/Tes >> t.txt", "Scripts/downloadv3.rb", "Scripts/FileNamerenaming.rb"] >> irb(main):004:0> > > > I think you may need/want to test for file-ness (and not directory- or > other-ness) of the files as well. > > Personally, I'd go with the Find stdlib: > > require 'find' > nice idea! thank you very much :) -- Posted via http://www.ruby-forum.com/.