On my Windows 7 system, I have associated the
.blend extension with a specific bat file I wrote, which is shown below:
set PYTHONPATH="" "C:\Program Files\Blender Foundation\blender\blender.exe" "%1"
Here's the output of the command
blendfile="C:\Program Files\Blender Foundation\Blender\blender.bat" "%1"
When I double click a .blend file (e.g.
model.blend), the application (Blender) starts up fine, but the file in question is not opened. That is, the application starts as if the file
blender.bat was double clicked by itself.
The file is in the following folder:
(Note that the pathname contains spaces)
If I open up a command prompt at the above folder and run the following command:
I see the following output:
Error: Cannot read file 'F:\TRAINING_BLENDER\MY': No such file or directory unknown argument, loading as file: -
I understand that the problem is due to the folder name having embedded spaces, but I have the argument specificer (
%1) in double quotes to protect from that. What could be the problem?
Disclaimer: I have read this related question: Double clicking a file in explorer opens the associated application but not the file