Get-ChildItem -Include/-Exclude should support wildcards in the parent path
See original GitHub issueSample to remove all x64 subdirectories:
Get-ChildItem -Path ./ -Directory -Include "*x64*" -Recurse | Remove-Item -Force
From @mklement0: We want that it to work against the full path. For the leaf component it is already work.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Get-ChildItem - PowerShell
The Exclude parameter uses the asterisk ( * ) wildcard to specify any files or directories that begin with A or a are...
Read more >How to use wildcards with directories in PowerShell's Get- ...
I found this article explaining the wildcard and range operators, but unfortunately it does not discuss using them with directory names; only ...
Read more >Get-ChildItem PowerShell Ultimate Guide
The PowerShell cmdlet Get-ChildItem obtains objects from one or more specified locations, such as a file system directory, registry hive or ...
Read more >Get-ChildItem - PowerShell Command - PDQ
It uses the wildcard character (*) to indicate the contents of the Logs subdirectory, not the directory container. Because the command does not...
Read more >Complete GUide to PowerShell Get-ChildItem
Here we discuss top 16 parameters of PowerShell Get-ChildItem with properties and ... To exclude files you need to use -Directory parameter.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@raghav710 Feel free to grab!
I only split discussion to discuss one branch. Typo fixed.