# “'blender' is not recognized as an internal or external command” error when using blender from the command line

How to render a scene using DOS in blender. Every time I try, an error occurs in the DOS window like the following;

C:\blender 2.9>blender 'blender' is not recognized as an internal or external command, operable program or batch file.

blender is probably not added as a command to the path in windows (see this link: https://superuser.com/questions/689333/how-to-add-installed-program-to-command-prompt-in-windows)

Or you can just open a command prompt in windows, navigate to the place where the blender executable file is installed (usually C:\Program Files\Blender Foundation\Blender), and invoke the program directly by typing blender.exe

Alternatively you can create a batch that starts the blender.exe command directly.

Copy this text, (replace the file name with the corresponding path and name).

@echo off
"C:\Program Files\Blender Foundation\Blender\blender.exe" -b "path-to-the-file-you-want-to-render" -a
Echo Rendered all!
pause


Paste it on a new text file and save it as a file with a .bat extension.

Double click on the batch file to render.

If blender is not installed, just replace the path for blender so that it points to the folder where the executable file is stored.