Guest User

Untitled

a guest
Sep 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. # analayzer cleaner
  2. # delete files in folder which size is less than input value
  3.  
  4. min_file_size = ARGV.last
  5. count = 0
  6.  
  7. Dir['*/*.sps'].each do |file|
  8. if File.size(file) < min_file_size.to_i
  9. File.delete(file)
  10. count += 1
  11. end
  12. end
  13.  
  14. puts "#{count} deletions"
Add Comment
Please, Sign In to add comment