Created
January 28, 2012 03:34
-
-
Save jacksonwillis/1692445 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
And in ruby: | |
<code ruby> | |
files = File.read("/tmp/removeold.txt").split("\n").reject { |line| line =~ /^(#.*)?$/ } | |
files.each do |file| | |
puts "Deleting #{file}." | |
File.delete(file) rescue puts $! | |
end | |
</code> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment