The following script will copy a directory tree to a single directory - essentially discarding the directory structure. It also filters by file type and only includes RFA files. Copy the code to Notepad, save as CMD or BAT.
dir "sourcedirectory" /A:D /B /S > tempListOfDirs.txt
For /F "tokens=*" %%A IN (tempListOfDirs.txt) Do (
If Exist %%A* (
XCOPY "%%A\*.rfa" "targetdirectory" /Y /R
Once you have a single directory of RFA files and have loaded them all into Revit, you could then use the categorizer to sort them all into directories by Category... its really an automated and free way to upgrade and sort your family library.
Note: I had previously posted a similar script using Robocopy at
What Revit Wants: Copy a Directory Tree "Flat" - all files into one folder, no subfolders
This code modified from:
Commerce Server Guy: Tree-To-Flat Copy Using XCopy