I found this script somewhere the other day.
class Main
def update
if $firstrun == true
$firstrun = false
$etimekeep = 22*129
$fontface = "Impact"
$fontsize = 22
Graphics.freeze
$scene = Scene_Title.new
end
while $scene != nil
$scene.main
end
rescue Errno::ENOENT
#p $!.to_s Enable this line if you want to be notified when it runs.
filename = $!.message.sub("No such file or directory - ", "")
$dest = "C:/RMXPgame/" + filename
slashes = $dest.count "/"
loop do # Truncates the end of the string at the slash
$dest = $dest.chop
slashe = $dest.count "/"
if slashes != slashe
$dest = $dest + "/"
break
end
end
t = 0
loop do
newfileloc = "C:/RMXPbackup/" + filename
t +=1
case t
when 1
newfileloc += ".mp3"
when 2
newfileloc += ".wav"
when 3
newfileloc += ".ogg"
when 4
newfileloc += ".mid"
when 5
newfileloc += ".jpg"
when 6
newfileloc += ".png"
when 7
newfileloc += ".bmp"
end
if FileTest.exist?( newfileloc ) == true
FileUtils.mv(newfileloc, $dest)
break
end
end
end
end
$firstrun = true
while $scene != nil
$scene.main
end
$main = Main.new
while $main != nil
$main.update
break if $scene.nil?
end
But you need the FileUtils.rb as well. Just google for it.