Ask coding questions

← Back to all posts
Is Windows Batch/Batch File Supported on Repl.it?
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
exit
1:
echo 1

gives

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

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

Commentshotnewtop
[deleted]

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

[deleted]

@HarperframeInc sadly, repl.it 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.

[deleted]

Or you could make a bat to sh translator.

HarperframeInc (230)

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