Skip to content

Instantly share code, notes, and snippets.

@sandrods
Created September 20, 2011 20:44
Show Gist options
  • Save sandrods/1230272 to your computer and use it in GitHub Desktop.
Save sandrods/1230272 to your computer and use it in GitHub Desktop.
unzip downloaded files
#!/usr/bin/env ruby
require 'fileutils'
f = FileUtils
file = ARGV[0]
dir = "tmp.#{Time.now}"
f.mkdir_p dir
f.mv file, dir
f.cd dir
%x( unrar e #{file} )
%x( unzip "*.zip" -d . )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment