Hmm.. you could use $did(id).text to get the line's text.
About the files' path, the only pattern I see is this:
C:\mirc\mIRC-\blabla
.extTheRestThatYouDontWant.
Path\to\file.extCrapYouDontWantYou could use a $gettok with C = 46 (.) and return:
$gettok(WholePath,1,46) -> 1st part of the path, up to the filename, but NOT extension =
C:\mirc\mIRC-\blabla$gettok(WholePath,2,46) -> 2nd part, including extension and the crap you dont want to show. =
abcTheRestThatYouDontWant.Now, get that crap (Eg:
mrc34adv1.43), return only the 3 first chars, which correspond to the extension --> $left($gettok(WholePath,2,46),3) =
mrcAfter that, add the dot (.) in the middle:
$+($gettok(WholePath,1,46),$chr(46),$left($gettok(WholePath,2,46),3))
The above *should* work in all the extensions are 3 lettered. I am pretty sure that a regex would fit you better, but I also know zero about them.
Hole this helps

Zyzzy.