Last active
December 24, 2015 16:38
-
-
Save ziadoz/6829018 to your computer and use it in GitHub Desktop.
Unzip GMVault Compressed Emails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# GMVault: http://gmvault.org/ | |
# Unzips GMVault compressed emails (.eml.gz). | |
# Enter an absolute path, e.g., /Users/Username/gmvault-db/db | |
print 'Enter the directory path containing the zip files: ' | |
path = STDIN.gets.chomp.chomp('/') | |
path = path + '/**/*.eml.gz' | |
require 'shellwords' | |
Dir.glob(path).each do |gzip| | |
puts 'Extracting Email: ' + gzip | |
system "gunzip #{Shellwords.escape(gzip)}" | |
end | |
puts 'Completed!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment