Blender 2.8 Command Line: Errors on running script I am looking to run my python scripts using the command line. So far, I have confirmed I can open blender using the command line, and I can open a specific file as well.

The issue comes when I attempt to load a script. I seem to always get the following error:

OSError: Python file "C:\Program Files\Blender Foundation\Blender\genererate_tears.py" could not be opened: No such file or directory


I would imagine I have some missing reference, but I have not been able to find anything where someone else solved this issue.

Here's what my my command line looks like

C:\Program Files\Blender Foundation\Blender&gt;blender -b H:\Blender3d\ScriptingPractice\scriptingpractice.blend -P genererate_tears.py


Essentially:

[Blender.exe] _ [blender file with script] _ [syntax to run python] _ [python script isnide of .blend file]

I have tested the rest of it without the script part, and not running it in the background, so I'm pretty confident it's just the script reference


and according to this post https://developer.blender.org/T60330 it isn't an issue with older versions?
Thankyou @RobertGützkow for your help!

The solution was true that I needed to have a python-specific file (outside of blender) that I could run.

To do this I 

1) created a new Text.txt file
2) named it the same name as my script (optional)
3) copied and pasted the code into the text.txt file
4) rename the text.txt --> text.py
5) add the text.py file path to the code.

Here's what mine looked like :
(with the command prompt pointed at blender)

C:\Program Files\Blender Foundation\Blender>

blender H:\Blender3d\ScriptingPractice\scriptingpractice.blend -P H:\Blender3d\ScriptingPractice\genererate_tears.py