How to import SVG files without putting them in a new collection? I am able to bulk import hundreds of SVGs using a script with the command:
bpy.ops.import_curve.svg(filepath = path_to_file)

However, this results in multiple unneeded collections and unnamed curves like this:
3D_Printer.svg Collection
    Curve.1
Biometrics.svg Collection
    Curve.2
Drones.svg Collection
    Curve.3

Manually deleting all the collections would just leave the unnamed curves:
Curve.1
Curve.2
Curve.3

Is there some way, possibly through a modified SVG script or rename/collection script to get a result like:
3D_Printer.svg
Biometrics.svg
Drones.svg

My SVGs are optimized so there is only one curve per file, so the extra collections and generically named curves are quite inconvenient. I'm not sure which is easier, modifying the
io_curve_svg scripts, or creating a script to rename the curve and collapse the collection after the fact.
The following script is intended as a limited example tested in Blender 2.9:
create a list of current collections;
given a specified directory:
get a list of all files in that specific directory;
if the file name ends with .svg perform the import curve operation;
create a list of collections after import operation (exclude original collections);
for each collection created during the import operation:
rename the objects in the collection;
link to scene's master collection;
unlink from existing collection;
remove the collection;
import bpy
import os

dir = &quot;c:\\tmp\\svg&quot;
files = os.listdir(path=dir)
tgt_coll = bpy.context.collection # master scene collection
colls = [coll for coll in bpy.data.collections]

for f in files:
    if not f.endswith(&quot;.svg&quot;):
        continue
    bpy.ops.import_curve.svg(filepath = os.path.join(dir, f))

new_colls = [coll for coll in bpy.data.collections if coll not in colls]

for coll in new_colls:
    for obj in coll.objects:
        obj.name = coll.name # coll.name[:-4] to strip .svg
        tgt_coll.objects.link(obj)
        coll.objects.unlink(obj)
    if len(coll.objects) == 0:
        bpy.data.collections.remove(coll)