Created
August 12, 2014 17:24
-
-
Save drichert/155395aef697b1048867 to your computer and use it in GitHub Desktop.
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 | |
dir = ARGV[0] | |
batch_size = ARGV[1] || 100 | |
all_files = Dir.glob("#{dir}/*") | |
num = 0 | |
all_files.each_slice(batch_size) do |files| | |
cmd = "zip zip-#{num}.zip #{files.join(" ")}" | |
`#{cmd}` | |
num += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment