# Can I import multiple .wrl files into Blender at once?

I exported a model from Solidworks into .wrl files - each piece being it's own .wrl. I can import them into Blender just fine, but there's hundreds of .wrl files. It'd be a terrible waste of time importing them one by one.

Is there a way I can do a batch import of .wrl files into Blender?

• @MrZak, unfortunately, no. When multiple files are selected with Shift+click, the last one selected is the one that opens. – Jesse Mar 10 '16 at 23:53

Script is probably going to be your best bet? This should be safe to tinker with in the scripting screen. Paste, edit dir and run script to check output in the terminal, then uncomment (remove the #) to run and import the files.

import bpy
import os

dir = 'C:\Temp'

for file in os.listdir(os.path.normpath(dir)):
if file.endswith('.wrl'):
path = os.path.normpath(os.path.join(dir,file))
print(path)
#bpy.ops.import_scene.x3d(filepath=path, axis_forward='Z', axis_up='Y')

• may I suggest one small modification to your proposed script? Change the line "if file.endswith('wrl'):" by adding a dot before the ".wrl". This would find files with a file extension "wrl", but ignore a file with a name such as "snowrl" and no file extension. – brasshat Mar 11 '16 at 5:35
• noted and edited :) – Shiprex Mar 14 '16 at 21:28
• I can't say I'm very programmer-esque, but I'll assume that this is the best method. I found another way to accomplish my task, but I appreciate the suggestions. :) – Jesse Mar 23 '16 at 19:08