Import material in a specific path

In material browser I have three different Material (A,B and C), I would like to import these 3 material in a specific folder: Test/Spec1 (please see attached picture)
My issues are two:
-How to select only these Materials, I thought either to use and a kind of “if condition” and the name of the material or to delete all the materials unnecessary and afterwards import all of them in that path
-How to import a range of material in that particular path: Folder: test Category: Spec1

Can someone help me in this regard? I hope it’s clear!