Powershell Compare-Object on empty folder

前端 未结 1 1269
南笙
南笙 2021-01-23 18:34

I am writing a simple DLL copying script to help my dev team in setting up their local environments. I check the build devdrop folder and get a list of DLL files. I then look at

相关标签:
1条回答
  • 2021-01-23 18:49
    $newFiles = @(Get-ChildItem -recurse -path "$drop\$latest\ship" -name)
    $oldFiles = @(Get-ChildItem -recurse -path $bin -name)
    $files = Compare-Object -ReferenceObject $newFiles -DifferenceObject $oldFiles -IncludeEqual -PassThru
    
    0 讨论(0)
提交回复
热议问题