I want to fetch a specific file recursively which may exists in sub-folders and copy it to destination folder.
I tried executing below command:
Get-ChildItem "D:\Source Directory" | Copy-Item -Destination "D:\Target Directory" -Recurse -filter file.doc
The command copied more files then the one fetched.
Any better solution?