Use FileUtils#cp
The easiest way to copy files is with FileUtils#cp from the Ruby Standard Library. For example:
require 'fileutils'
FileUtils.cp '/tmp/foo', '/tmp/bar'
You can certainly use variables to store filenames collected from standard input if you like. Just don't reinvent the wheel if you don't have to, and leverage the standard libraries whenever you can.