I am using Get-ChildItem to collect files in multiple paths.
For example
Get-ChildItem -Path c:\Test1, c:\Test2 -Filter *.xmd -Recurse -File If one of the directories is missing I get errors like these
Get-ChildItem : Access to the path 'C:\windows\temp" is denied.
First, I do not understand why this directory is searched and second what is the way to avoid this?