Skip to content

Instantly share code, notes, and snippets.

@ydhydh
Created May 10, 2012 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ydhydh/2651850 to your computer and use it in GitHub Desktop.
Save ydhydh/2651850 to your computer and use it in GitHub Desktop.
unzip
require 'find'
require 'fileutils'
basePath = '/Users/.../Documents/New.Girl.S01E18.720p.HDTV.X264-DIMENSION'
if(!File.exist?(basePath + '/unzip'))
Dir.mkdir(basePath + '/unzip')
else
FileUtils.rm_rf(basePath + '/unzip')
end
archive = basePath;
destination_folder = basePath + '/unzip' # + File.basename(f)
status = system "unzip -o \"#{archive}/*\" -d \"#{destination_folder}\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment