Here's the example from your link
REM Reassign F1 to list current directory
REM Reassign F10 to give DOS version
REM Now Put a menu on the Screen in Bright Yellow
ECHO ←[12;20HF1 List Current directory
ECHO ←[14;20HF10 Print DOS Version Number
REM Reset display to normal
(note ← stands for the Escape character, entered using Ctrl+P then Esc inside the DOS
EDIT command or Windows command-prompt
So my question is, can you send function key commands to DOS?
If the example works, yes you can. You may in fact be running Windows and not DOS, which may change things. Can you explain what happened when you tried the batch file above?
When you write "send function key commands" you might have something different in mind. If so it would be useful for you to explain what you want to achieve in a little more detail.
If so, what is the best way to do this?
I don't know, but the method in the article seems reasonable (if limited in applicability).