I've got to find files and return their paths that match a pattern. The folder and subfolders contain several million files with thousands of folders. I've started running this script several hours ago, but I don't know if this is ever going to finish. Is there a more efficient way to do this? Any help would be appreciated.

 Code:
$type=Tscm0005,Cxac0005,Tsfm0033,Tsec0002,tsec0006,tsec0008,tsec0010,tscm0002,tsfm0081,tsfm0083,tsfm0084,tstm0001

	For Each $reporttype in $type	
		$reports = dirplus("f:\reports\trans\monthold","/s /a-d /m " + $reporttype)
		For Each $file in $reports   
			$=Writelog2('c:\admin\'+ $reporttype +'.txt',$file.name +";"+ $file.path)
		Next
	Next
_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain