Skip to content

Instantly share code, notes, and snippets.

@masaakif
Created March 27, 2012 03:10
Show Gist options
  • Select an option

  • Save masaakif/2212149 to your computer and use it in GitHub Desktop.

Select an option

Save masaakif/2212149 to your computer and use it in GitHub Desktop.
ErrorReportsで始まる複数ディレクトリの中の不要なテキストファイルとZIPファイルを削除する
Dir::glob("ErrorReports*/*/*.OrderEvents.txt").each do |file|
puts "#{file} : #{File.stat(file).size}"
File::delete(file)
end
Dir::glob("ErrorReports*/*1.24.*.zip").each do |file|
puts "#{file} : #{File.stat(file).size}"
File::delete(file)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment