yes
C:\Program Files\Steam\steamapps\<namehere>\team fortress 2\tf\cfg\
Look there for an "autoexec.cfg"
If you can not find it, make a notepad document and paste in the codes you want. When done, save it as I said and in that folder. This configuration file will run every time TF2 is started.