that is because you incorrectly copied the code, and left out the alias names. That gave you those unrequired results.
filter -fk list2.txt fword
alias -l fword
write listnew.txt $gettok($1,1,32)
Do you see you left out the red parts? You also somehow put the filter command in the second alias as well, but it should not be there, only in the first alias. Also I just noticed you replaced the calling alias "fword" with filter (in blue)
Note that these 2 aliases go into the remotes (alt+r -> tab Remote), and not the aliases tab.
Just copy paste the aliases like you are seeing them on the board and all will be fine
Btw this code will only work on mirc 6.15-6.16, because the k switch is new.