Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby file copy

require 'fileutils'
# Copy a file
FileUtils.cp 'myfile.txt', 'myfile.txt.bak'
# Copy list of files to folder
FileUtils.cp %w(somefile.txt another.txt), './bak'
FileUtils.cp Dir.glob('*.rb'), './bak', :verbose => true
Source by ruby-doc.org #
 
PREVIOUS NEXT
Tagged: #ruby #file #copy
ADD COMMENT
Topic
Name
7+4 =