Created
May 5, 2021 21:10
-
-
Save jasonrobot/9a97d95b819435610a38d0cdd34c9226 to your computer and use it in GitHub Desktop.
A ruby script to archive a bunch of folders of photos using 7zip
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 | |
require 'date' | |
index = 1 | |
date = Date.today.to_s | |
ARGV.each do |dirname| | |
dirname += '/' unless dirname.end_with? '/' | |
# puts "7z a #{date}.#{index}.7z #{dirname}*.jpg" | |
system "7z a #{date}.#{index}.7z #{dirname}*.jpg" | |
index += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment