I had to do something like this a couple of weeks back.
The client had sent over a DXF file, I had to extract all of the blocks, create a new drawing and the insert a number of the blocks into a new drawing. (This was a piping layout)
Each file was 'xref' into the new drawing on a new layer named as per the block.
I used a script for this, compiled in Excel, then pasted into notepad as a ***.scr:
Create the layer name & colour.
Set to the new layer.
Insert the Xref.
Move on to next file etc etc .......
(COMMAND "-layer" "N" "10IN-GH-90007-HG-1-PDK" "co" "132" "10IN-GH-90007-HG-1-PDK" "")(COMMAND "-layer" "S" "10IN-GH-90007-HG-1-PDK" "")(COMMAND "-xref" "A" "E:\\Stylemark Designs\\Project Folder\\nested folder\\second nested folder\\piping\\EXTS-PIPE-PANCAKE-DECK\\10IN-GH-90007-HG-1-PDK.dwg""0,0,0""1""1""")
cells are shown [ ], I then used used 'concatenate'
[10IN-GH-90007-HG-1-PDK] [(COMMAND "-layer" "N"] ["] [" "] ["co" "132"] ["")] [(COMMAND "-layer" "N" "10IN-GH-90007-HG-1-PDK" "co" "132" "10IN-GH-90007-HG-1-PDK" "")]
here is the final cell contents for the first command, repeat as required
[=CONCATENATE($H$60,$D$5,F120,$D$5,$L$60,$J$60,F120,$J$60,$N$120)
F120 is the file name (minus the '.dwg')
I had over 200 to do, pull the file names from explorer, one line per drawing.
All I had to do was create the base drawing and then run the script, took less than 5 mins to run
Steve