Quantcast
Viewing all articles
Browse latest Browse all 122

Fetch all the files in a folder but exclude all the files in a sub folder by using powershell

I have a powershell script to fetch all the files in a folder but exclude all the files in a sub folder. I am using the following script, but not giving the expected results.

Get-ChildItem -Path $srcpath -Force -Exclude "Monthly Reports" -Recurse

Note: Trying to exclude the files in the sub folder "Monthly Reports"


Viewing all articles
Browse latest Browse all 122

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>