Actually, I believe that the above answer is incorrect.
Suppose we have the following directory structure:
dbl_wc (top level)
--one_level_in
--aa.txt
--one_level_in1
--bb.txt
--deeper_dir
--abc.txt
Copy-Item .\dbl_wc\**\*.txt copy_target -Force
Will search only * .txt in any directory under. \ Dbl_wc. And it will not look in subdirectories (e.g. \ dbl_wc \ one_level_in1 \ deeper_dir). This way it will get both aa.txt and bb.txt, but not abc.txt. It will also not receive any .txt file directly underdbl_wc
, ** , .
EDIT: *, ( Copy-Item .\dbl_wc\*\*.txt copy_target -Force , )