I want to copy all JPGs within a directory (including subfolders) to a target destination (flat hierarchy). My Powershell Script seems super slow :(
Any ideas how to make the fastest approach? Is robocopy a faster solution? It seems that Robocopy always also creates the folder of the JPG. But I want it flat like C:\destination\image1.jpg C:\destination\image2.jpg C:\destination\image3.jpg
Is it possible that only images are copied that arent already in the target folder?
Get-ChildItem -Path "R:\XXX\*" -Include *.jpg -Recurse | Copy-Item -Destination $targetpath -verbose