You can do that this way:
cmd < test.bob
If you use Delayed Expansion in your "Not Batch file", use this:
cmd /V:ON < test.bob
However, there are several differences that apply to the "Not Batch file"; the most important one is that the following Batch file features don't works in the "Not Batch file":
- Access to Batch file parameters via %1 %2 ... and execution of SHIFT command.
- Execution of GOTO command.
- Execution of CALL :NAME command (internal subroutine).
- Execution of SETLOCAL/ENDLOCAL commands.
The complete description of the way to do this ("Execute a text file with no .BAT extension as a Batch file") is described at this post, with examples and recommendations.