Reputation: 3256
I have two folders which have many sub folders like:
c:\bundles [bundles has apibundle, appbundle, etc.] c:\web\css [css folder has css files like 123.css, 335.css]
I want to find path matching css files inside bundles folder for example:
c:\bundles\appbundle\123.css -> match -> c:\web\css\123.css
is this possible to do in powershell? can anyone give me example how this can be done.
By the way i am trying this but it is very time consuming adding each file name one by one:
gci -Path C:\bundles -recurse -filter "123.css"
Upvotes: 1
Views: 459
Reputation: 72680
If you just want to compare the file name you can use Compare-Object
like this :
Compare-Object -Property name -IncludeEqual -ExcludeDifferent (Get-ChildItem "C:\bundles" -recurse) (Get-ChildItem "c:\web\css" -recurse)
Upvotes: 1