Thank you for reading my post and your advice :) The scenario is, that I have an HD built in my desktop where I collected files for many years. So one day I did a backup to an external HD, which I then took travelling and kept on collecting photos from my phone etc.
Since then I changed the folder structure on my desktop a lot, so I can't compare the folders/files 1on1.
The goal is obviously, that all new files that are on my external HD get copied to my internal HD, all put in a folder named like '2SORT'.
I found a faster version of compare-object (see comments) but yet the results are not correct, it will copy a lot of files that already exist.
Here's what I got in Powershell:
cls
$path_desktop = 'C:\Files\Media\Bilder'
$path_external = 'E:\Bilder'
$path_destination = 'C:\Files\Media\Bilder\2SORT'
$ref = Get-ChildItem -path $path_desktop -Recurse -File
$com = Get-ChildItem -path $path_external -Recurse -File
$file_Diffs = Compare-Object -ReferenceObject $ref -DifferenceObject $com | Where { $_.SideIndicator -eq '=>' }
$file_Diffs |
foreach {
$copyParams = @{}
$copyParams.Path = $_.InputObject.FullName
$copyParams.Destination = "$path_destination\" + $_.InputObject.Name
copy-Item @copyParams -force -PassThru | Write-Host
}