You can also go to your Call of Duty/main/players folder, select the folder with the name of your profile, open config_mp.cfg with wordpad, and add a line
bind F3 "name ^^22K^^33~^^77 YOUR NICK"
So, when in game, press F3 to rename.
That is valid for any command, should be useful in the future.