Open all files inside a directory except those containing a specific keyword

Invoke-Item

  • Open files in their respective default programs.
    This command can only be used through PowerShell.
    More information: <https://learn.microsoft.com/powershell/module/microsoft.powershell.management/invoke-item>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

Invoke-Item -Path {{path/to/directory/*}} -Exclude {{*keyword*}}

click the source code to copy