3
$\begingroup$

I'm trying to batch render multiple blendfiles from the command line in windows 10 following this thread and got stuck in the very first step. The error message in German is saying that blender is not found or written incorrectly. What's the issue here? Thanks for your help!

error

According to this tutorial the path should be like in this screenshot. (On my PC I just have "user" instead of a name. I dragged in the blender file after "-b" to copy the path.) tutorial

I tried this, which seems to open the explorer as soon as I click the command prompt:

Path?

$\endgroup$
7
  • 3
    $\begingroup$ It's Windows and Blender is not in the path. You have to invoke it using its full path which is something like C:\\Program Files\\Blender Foundation\\Blender M.mm\\blender.exe where M.mm is the version major and minor numbers, ie 2.93 $\endgroup$ Commented Mar 27, 2022 at 19:10
  • $\begingroup$ ok, but according to the thread and this tutorial the render should start with: C:\Users\user>blender exe -b (path to blendfile) -a There is no "Program Files" etc. youtube.com/watch?v=DLxQNpvlCIo $\endgroup$
    – user123511
    Commented Mar 27, 2022 at 20:19
  • $\begingroup$ That will work if you've added C:\\Program Files\\Blender Foundation\\Blender M.mm\` to the PATH` variable in windows. If you open a command window and type PATH it will show you the current path. $\endgroup$ Commented Mar 27, 2022 at 20:24
  • $\begingroup$ I now tried to put the directory in the path (see screenshot in the edited question). This just opens the windows explorer in the respective directory when I open command prompt... sry I'm a complete beginner with command lines... $\endgroup$
    – user123511
    Commented Mar 27, 2022 at 20:36
  • $\begingroup$ That's not how you add a variable to the path. I've written an answer with instructions. See if it helps. $\endgroup$ Commented Mar 28, 2022 at 0:15

1 Answer 1

1
$\begingroup$

For the English speakers among us the error message in the first screenshot is the command "blender.exe" is either misspelled or could not be found. The simplest solution is to find the path to blender.exe, and invoke the command using the full path:

C:> C:\Program Files\Blender Foundation\Blender 2.93\blender.exe -b C:\Users\user\Desktop\suzanne.blend -a

in your example.

The second simplest way, and much easier to use if you're going to run Blender frequently from the command line is to open Settings, go to System Properties, select Environment variables, and add the path:

settings for adding path variable

hit new and paste the path in the entry:

pasting the path

The problem with the 2nd approach is that every time you install a newer version of Blender you have to redo this step, remembering to delete the old path.

The instructions for adding path, from a Microsoft document:

  1. On the Start menu, right-click Computer.

  2. On the context menu, click Properties.

  3. In the System dialog box, click Advanced system settings.

  4. On the Advanced tab of the System Properties dialog box, click Environment Variables.

  5. In the System Variables box of the Environment Variables dialog box, scroll to Path and select it.

  6. Click the lower of the two Edit buttons in the dialog box.

  7. n the Edit System Variable dialog box, scroll to the end of the string in the Variable value box and add a semicolon (;).

  8. Add the new path after the semicolon.

  9. Click OK in three successive dialog boxes, and then close the System dialog box.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .