question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get-ChildItem -Include/-Exclude should support wildcards in the parent path

See original GitHub issue

Sample 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:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
iSazonovcommented, Oct 14, 2017

@raghav710 Feel free to grab!

1reaction
iSazonovcommented, Jun 28, 2017

I only split discussion to discuss one branch. Typo fixed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found