Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
copy binary files to dir and zip
Chas Conquest
5/13/2007 7:53:00 PM
'src' dir contains 2 binary files (mp3s)
I want to copy the files from 'src' into a new dir and then zip it.
The copy into a new dir is fine, but
I can't seem to get the new dir in to the zip.
Any clues?
Thanks!
<----Code----->
require 'rubygems'
require 'zip/zipfilesystem'
require 'FileUtils'
stuff = FileUtils.cp_r 'src/.', 'order' #this copies the files
fine...
Zip::ZipFile.open('stuff.zip', Zip::ZipFile::CREATE) do |zip|
zip.file.open('stuff.zip', 'w') { |f1| f1 << 'order'}
end
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
copy binary files to dir and zip
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password