Hello, there is $file() which has various property, including .name, which will give you the name of the file without its extention, but that only works for existing filename.

$nopath works with string though, and can be used on non existing filename, get the position of the last dot in the filename string and get only the portion before that:

Originally Posted by Using maroon's example
//var %n $nopath(Up Up and Away....jpg),%p $pos(%n,.,$calc($pos(%n,.,0) - 1)) | echo -ag > $left(%n,%p)


A handy regex can also do the job: $regsubex($nopath(Up Up and Away....jpg),\.[^.]+$,)


Edit: the $nopath/$pos code only works when there is an extention but can be fixed with some if on %p or something, wheareas I did make the regex works even if there's no extention.



Last edited by Wims; 12/10/20 12:06 AM. Reason: details

#mircscripting @ irc.swiftirc.net == the best mIRC help channel