Great guide! I wish I had seen it before I figured everything out by myself. I just have to note, though, that one part of your script is potentially problematic. Specifically:
Code:
On *:GETFAIL:*: {
btrunc $filename $iif($calc($file($filename).size - 102400 ) > 0, $ifmatch, 0)
}
This doesn't provide any allowances for long filenames. For instance, I got that script from the "incomplete" website, and I started using it. I found it didn't seem to work at all, and for the longest time I didn't know why. I also noticed around that time, though I didn't associate it immediately, that when I started Windows XP, it gave me a message about having a file called "Program" in the root of C drive, and that it could cause problems with programs. Whenever that message came up, some of my startup programs didn't load, and some other things didn't work.
I kept deleting the file, but it kept showing up. I couldn't figure out when it was showing up, so I didn't know how to fix it. One day, I decided to finally ask someone how to fix the rollback script since it didn't seem to be working. After talking with some people, they figured out that the "$filename" part of the script wouldn't handle long filenames. And sure enough, with testing, I found that when it runs the "btrunc" command with a long filename without quotes, it cut the filename off at the first space. So "C:\Program Files\Mirc\Download\blahblah.divx.movie.avi" became "C:\Program". So that was when I found out where that "program" file was coming from.
So the guy showed me how to correct the script, and I thought I would post it here for anybody that keeps the default download directory for mIRC. The corrected script is:
Code:
On *:GETFAIL:*: {
btrunc $+(",$filename,") $iif($calc($file($filename).size - 102400 ) > 0, $ifmatch, 0)
}
The $+(",$filename,") part puts quotes around the filename, so it retains the spaces. It works great, and I no longer have corrupted downloads.
Stephen
Bookmarks