Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. Dir.glob('C:/Users/sarah_000/AppData/Roaming/ScanLog/*.log') do |f|
  2. file = File.open(f)
  3. if file.read[0..29].include? "success" and file.mtime < Time.new(2014,9,1) then
  4. File.delete(file)
  5. end
  6. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement