daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Sep 24th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top