Guest User

Untitled

a guest
May 2nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. require 'fileutils'
  2.  
  3. all_files = Dir.glob('c:/test/temp/**/*')
  4.  
  5. puts all_files
  6.  
  7. all_files.each do |f|
  8. FileUtils.rm f unless f == "c:/test/temp/file_you_want_to_keep.txt"
  9. end
Advertisement
Add Comment
Please, Sign In to add comment