Blogroll

rubyzip — Ruby gem to zip the folder and files

rubyzip — Ruby gem to zip the folder and files

Requirement:

Zip the file for some folders and files

 

Steps:

1. Create a folder chrome and put some files in it.

2. create a ruby file in same location and paste the below code

a. >gem install rubyzip

def zip_it(path)
require ‘rubygems’
require ‘zip/zip’
require ‘zip/zipfilesystem’

path.sub!(%r[/$],”)
archive = File.join(path,File.basename(path))+’.zip’
FileUtils.rm archive, :force=>true

Zip::ZipFile.open(archive, ‘w’) do |zipfile|
Dir[“#{path}/**/**”].reject{|f|f==archive}.each do |file|
zipfile.add(file.sub(path+’/’,”),file)
end
end
end

zip_it(“chrome”)

3. save and run the ruby file.

4. Zipped file will be created with in the chrome folder.

Advertisements
Jazzez

Jazzez

Hi Everybody,

Many of them asking to me What is the meaning of “Jazzez” . This is the time to publish the description about Jazzez.

1. Why you put title “Jazzez” for your blog?

Jazzez is my gang name in college life.

2. What is the meaning of “Jazzez”?

ya. good question. Come with me. In my college life, My gang named as “meaningless group” by Lecturers. So, Our friends decided to put a meaningless name for our gang. At that time our gem “Lakshu” gave an idea and also suggest the meaningless name “Jazzez”. So simply meaning of “Jazzez” is meaning less.

3. What is the status of Jazzez members? why u use that word in ur Technical blog?

Now all the meaningless members are becomes to a meaningful professionals. We all are growing day to day life. Now We all are meaningful except our gang name “Jazzez” . So, This is the try to make “Jazzez” is also a meaningful word. Then only I am using the word “Jazzez” in my technical blog. Nothing is impossible right?……….

4. Who are the members in “Jazzez” group?

*Laksmanan * Muthuselvan *Kesavan *Raveendran * Vijayakumar *Pandiaraja * Gopi *Vinayaga Moorthi * Silvan Ananiya * Marichamy *Gopala Krishnan *Muthukumar *Saravanakumar *Senthil kumaran *Bala subramanian *Ram Prasath *Peppin Shaju *Uma kanthan *Jayakanth *Dinesh ….

Our Gang members…

bench

We are not forgot the path which one is past………

At temple

Mari & myself


Regards,

P.Raveendran

Me