From: 7stud -- Date: 2007-10-30T15:49:38+09:00 Subject: Re: Zip an existing directory? M. Edward (Ed) Borasky wrote: > Peter Marks wrote: >>> zip -r archive.zip >>> Users/petermarks/Desktop/orbus/public/1/daily/2007-10-29/ >>> >>> I forgot the "-r" (for recursive). >> >> Thanks Ed, that archives the contents of "2007-10-29". Do you know if >> there is a way to make the new archive only contain the contents of >> "2007-10-29" and not the folders of the path leading to it? > > $ cd /Users/petermarks/Desktop/orbus/public/1/daily/ > $ zip -r archive.zip 2007-10-29 > > There's another way, but I don't remember what it is. Try this: Dir.chdir("/Users/petermarks/Desktop/orbus/public/1/daily") system("zip -r zipped_rails_app ./2007-10-29") -- Posted via http://www.ruby-forum.com/.