This is the code you posted

$files.each_with_progress do | val |
   $files.each do |element|
       FileUtils.cp("#{$old_home}/#{$sName}", "#{Dir.pwd}/#{element}")
    end
 end

This is how I changed it

$files.each_with_progress do | val |
   $files.each do |element|
       puts "#{$old_home}/#{$sName}", "#{Dir.pwd}/#{element}"
    end
 end