Importing VRML/X3D objects with their original file name
To start added a little script to make accessing the folder easier, we can now set the folder from the UI, Scene properties Scene panel.

import bpy
from bpy.props import StringProperty

bpy.types.Scene.wrl_dir = StringProperty(name="X3D Dir", subtype='DIR_PATH')

def x3d_path_draw(self, context):
    self.layout.prop(context.scene, "wrl_dir")

bpy.types.SCENE_PT_scene.remove(x3d_path_draw)    
bpy.types.SCENE_PT_scene.append(x3d_path_draw)


Ok with that done, I can use scene.wrl_dir rather than hard coding the folder.  Here I simply deselect all objects (equiv of bpy.ops.object.select_all(action='DESELECT')) before calling the import op,
then rename the selected objects to the file's name as the newly created objects are selected after the import.

import bpy
import os
context = bpy.context
scene = context.scene

# get list of all files in directory
file_list = sorted(os.listdir(scene.wrl_dir))

# get a list of files ending in 'wrl'
wrl_files = [f for f in file_list if f[-3:].lower() == 'wrl']

# loop through the strings in obj_list and add the files to the scene
for f in wrl_files:
    print("Processing %s" % f)
    # deselect all objs
    for o in context.selected_objects:
        o.select = False
    path_to_file = os.path.join(scene.wrl_dir, f)
    bpy.ops.import_scene.x3d(filepath = path_to_file)
    # rename them to file name, change to basename for instance.
    for o in context.selected_objects:
        o.name = f


Other methods would be to add an empty for each file, name the empty after the file and parent to it.  Or import each to a new scene.