我有下面的代码比较两个文件夹并输出每个文件夹不同的文件,有没有办法让它输出子文件夹中文件的完整文件/文件夹路径?
干杯
# Create varaibles to store folder paths - pass to Strings...
param([string]$argFolderA,[string]$argFolderB)
# Set variables for folder
$FolderA = Get-ChildItem -Recurse -path $argFolderA
$FolderB = Get-ChildItem -Recurse -path $argFolderB
# Compare the contents and output the files different within each folder.
Compare-Object -ReferenceObject $FolderA -DifferenceObject $FolderB >> C:\CmpOut.txt