22/04/27 18:14:04.80 pviHRewB.net
>>757
Ruby で書いてみた。
DryRun なので、実際にはファイルは削除されません
require 'fileutils'
# 絶対パスのディレクトリ名の後ろに、* を付けること!
# . で始まる、隠し directory, file を除く
dir_path = "C:/Users/Owner/Documents/test/*"
# そのディレクトリ内の全てのファイルパス・更新時刻を取得する。
# [ ファイルパス, 更新時刻 ]の配列の配列を戻す
def collect_filepaths_and_mtime( dir_path )
Dir.glob( dir_path )
.select { |full_path| File.file?( full_path ) } # ファイルのみ
.map { |full_path| [ full_path, File.