寻找PowerShell脚本以递归方式比较两个文件夹

时间:2009-09-29 16:56:55

标签: powershell

只是觉得有一个很好但是我的PS技能不能胜任任务。有人可以分享他们的吗?

1 个答案:

答案 0 :(得分:11)

轻松做一些简单的事情:

$d1 = get-childitem -path $dir1 -recurse
$d2 = get-childitem -path $dir2 -recurse
compare-object $d1 $d2

根据差异的定义,需要更复杂。