How to search a files in multiple folders that returns no duplicate in powershell? -


i trying find files in multiple folders thing files existed in folders

e:\sample\cd.dll e:\sample1\sample\cd.dll 

if using

get-childitem -recurse 

it returns 2 filesysteminfo of cd.dll. result should 1 filename of cd.dll in advance.

get-chiltitem -recurse | select-object -unique 

note -unique case-sensitive may want use sort-object cmdlet:

get-chiltitem -recurse | sort-object -unique 

you can eliminates duplicates get-unique cmdlet requires objects sorted first cmdlet work properly


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -