Ask coding questions

← Back to all posts
Is Windows Batch/Batch File Supported on
HarperframeInc (230)

Are we able to run batch files?
For example:

echo This is my test prompt
echo Choose A or B
choice /c AB
if %errorlevel% == 1 goto 1
echo 1


This is my test prompt
Choose A or B
[A,B] B

I know the Servers and stuff are on linux, but there are many programs on linux that run batch. Even the editor recognizes batch.


I'm not sure about .bat extension but if you save it with .sh extension then it should run perfectly.


@HarperframeInc sadly, is Linux based too so it should be fine till you rename the file to .sh as both .sh and .bat have almost same format.


Or you could make a bat to sh translator.

HarperframeInc (230)

@Harmeet_SinghSi There are many programs, such as wine, that run batch.