Getting all files names and paths
I am not the expert but you are creating too many threads. If possible create 5-10 threads. Whats happening here its creating too many threads and each thready try to access the resources, probably application spending too much time in sync. Try to do this. If parent directory have 5-10 sub folder(s) create one thread for each subfolder then scan subfolder using that thread only.
If you have 100 subfolders under main folder, then create 10 threads and pick subfolders in 10 blocks each. I'll try to give you sample code.