Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created May 2, 2017 16:11
Show Gist options
  • Save anonymous/1c9e62b3ce1e9841fe028aa884b801b0 to your computer and use it in GitHub Desktop.
Save anonymous/1c9e62b3ce1e9841fe028aa884b801b0 to your computer and use it in GitHub Desktop.
require 'fileutils'
all_files = Dir.glob('c:/test/temp/**/*')
puts all_files
all_files.each do |f|
FileUtils.rm f unless f == "c:/test/temp/file_you_want_to_keep.txt"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment