If you want the text %F in the answer then use %%F instead as the extra % will escape the % to allow it through...
You can also echo multiple lines like this if there are more it is more readable sometimes:
(echo test
echo 'parameter=test_%dbname%\%%F;
)>%filename%