>>857
Ruby で作った。
DryRun なので、実際には変更されません!

require 'fileutils'

# 絶対パスのディレクトリ名の後ろに、* を付けること!
# . で始まる、隠し directory, file を除く
dir_path = "C:/Users/Owner/Documents/*"
target_dir = File.dirname( dir_path ) # ディレクトリパスだけを取り出す

# そのディレクトリ内の全てのファイル名を、更新時刻順に並べ替える。
# [ ファイル名, 更新時刻 ]の配列の配列を戻す
def collect_filenames_orderby_mtime( dir_path )
Dir.glob( dir_path )
.select { |full_path| File.file?( full_path ) } # ファイルのみ
.map { |full_path| [ File.basename( full_path ),
File.stat( full_path ).mtime ] } # [ ファイル名, 更新時刻 ]
.sort_by { |ary| ary[ 1 ] } # 更新時刻でソート
end

sorted_ary = collect_filenames_orderby_mtime( dir_path )

sorted_ary.each.with_index( 1 ) do |ary, idx| # index は、1 から始まる
src_path = target_dir + "/" + ary[ 0 ]
# format で、0埋め3桁表示にする。
# ファイル名の先頭に、001_, 002_ などを付ける
dest_path = target_dir + "/" + ( "%03d" % idx ) + "_" + ary[ 0 ]

FileUtils::DryRun.move( src_path, dest_path )
end