Skip to content

Instantly share code, notes, and snippets.

@jonkarna
Created November 25, 2009 18:45
Show Gist options
  • Save jonkarna/242932 to your computer and use it in GitHub Desktop.
Save jonkarna/242932 to your computer and use it in GitHub Desktop.
FileUtils.rm_r takes an array
tmpfiles = Dir.glob("./**/.tmp")
FileUtils.rm_r tmpfiles
mp3files = Dir.glob("c:/**/*.mp3")
#the two ** == recursive
mp3files.each{|file| do_something_with(file) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment