This Compare-Object
doesn't work, but is there a way to do the same thing?
For ($F=0; $F -le $NumberOfSameFolders; $F++)
{
$Results$F = Compare-Object "$FilesInFolderX$F" "$FilesInFolderY$F"
-Property Name, LastWriteTime -IncludeEqual -PassThru |
Select-Object FullName
}
This is an experiment that works for the 20th pair of folders.
$Results20 = Compare-Object $FilesInFolderX20 $FilesInFolderY20
-Property Name, LastWriteTime -PassThru | Select-Object FullName