FileUtils cp_r


#1

Hi…

i want to copy a folder recursively

i did it using cp_r(source,destination)

it works correctly.

but it sould not be overwritted…

how can i do it pls help me…

even i used remove_destination => false…

but it gets overwritted…

any advices…

Thanks


#2

Maybe you can use

unless File.exists?(destination) or Dir.exists?(desitination)
cp_r(source,destination)
end