Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Output if folder compare are the same.

$
0
0

Nohandle -

 

This is a script you posted a while back.  How can I get the script to output if the folders are the same "The data in the folders are the same"

 

and still show the output if they are different.

 

 

$folderReference="serverpath"$folderDifference="laptop path"$FolderReferenceContents=Get-ChildItem$folderReference-Recurse | where-object {-not$_.PSIsContainer}$FolderDifferenceContents=Get-ChildItem$folderDifference-Recurse | where-object {-not$_.PSIsContainer}#get only files that are on laptop not on serverCompare-Object-ReferenceObject$FolderReferenceContents`-DifferenceObject$FolderDifferenceContents-Property ('Name', 'Length') -PassThru |where-object { $_.SideIndicator -eq'=>'} | selectFullName

Viewing all articles
Browse latest Browse all 10624

Trending Articles