title: ruby copy folder with subfolders to a target location
body: <p>I'm trying to copy a folder with all its subfolders from source to a destination folder.
  The below code doesn't seem to do it. I'm able to copy just the files instead of subfolders by using   </p>
  
  <pre><code>FileUtils.cp_r(Dir["/Volumes/TempData/Collects/Sasi/android/*.*"],"/Volumes/Data/Apps/android")
  </code></pre>
  
  <p>What is it that I'm missing?</p>
  
  <pre><code>require 'fileutils'
  puts "operating_system"
  operating_system = gets.chomp
  
      if operating_system == "android" then
       FileUtils.cp_r(Dir["/Volumes/TempData/Collects/Sasi/android/**"],"/Volumes/Data/Apps/android")
       puts "done"
      elsif operating_system == "ios" then
       FileUtils.cp_r(Dir["Volumes/Data/Apps/iOS/CX5/**"],"/Volumes/TempData/Collects/For_CS")
       puts "done"
      else 
       puts "do nothing"
      end
  </code></pre>