Reputation: 22
Hi I need to run a file witch contains batch code from cmd and is not a batch file.
I have tested cmd < test.bob
and it gets one line in and ends
I did this before but I don't remember the code i think it was cmd /v:on < test.bob
or cmd /E:on < test.bob
please help me
note please don't tell me to change the extension
Upvotes: 0
Views: 150
Reputation: 67216
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":
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.
Upvotes: 1