Hi
I want to compare compare the contents of 2 folders but I only have access to my copy of the folder in question and the contents of the folders in question are both large as well as sensitive in parts so copying the files alongside each other and comparing them directly is not an option.
As such I was hoping I could catalog the entire folder structure in a file my end (I thought CSV - but I’m easy on the format really) and forward the PowerShell I use to the person at the other side so they could produce the same detail. We could then compare the catalog files produced to look for differences.
To give some context - I’m essentially trying to troubleshoot why something doesn’t work at the other end and reviewing the traits of the 2 sets of (what should be identical) files for clues
I’m almost there - using the PS command at the bottom of the post - but the parent folders of the 2 folders in question differ and I’d like them to list the same - e.g) My Folder structure is say c:\Test\Files\dir1\dir2 and theirs is g:\share\test\Files\dir1\dir2.
I’d like the paths listed in both catalog files to be common - i.e. simply be \Files\dir1\dir2
How do I achieve this folks?
Thanks
Adam
$Files = @(Get-ChildItem -Path $Path -file -Recurse) | Select-Object name, directory,lastwriteTime, @{ Label = ‘File Version’; Expression = { $_.VersionInfo.FileVersion }},FullName | Export-Csv “$env:TEMP\Files.csv” -force -NoTypeInformation