Using FileUtils cp_r
is usually how I copy directories, but I can't seem to exclude the base directory. This is what I wanted to work, but it doesn't:
FileUtils.cp_r "#{source_path}\\**", target_path, :verbose => true
source_path
has sub-directories I want to copy recursively. I just don't want the actual source_path
directory, just everything below it.
I tried using Dir.glob
but could not get it right.
This is a Windows copy and I know I can use xcopy
but want to know how to do it in Ruby.
.keep
file so they are not ignored from the recursive copy – Allanson