Created
December 19, 2016 22:31
-
-
Save ZackMattor/21df01c424fb22a0a52b4be38f44b277 to your computer and use it in GitHub Desktop.
Flatten folder structure
This file contains hidden or 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
require 'fileutils' | |
count = 0 | |
Dir::glob('images/**/*.jpg').each do |image| | |
FileUtils::copy(image, "yay/#{count}.jpg") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment