Skip to content

Document -Force parameter for Resolve-Path and Convert-Path cmdlets #10755

@ArmaanMcleod

Description

@ArmaanMcleod

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Added -Force parameter to Resolve-Path and Convert-Path cmdlets to support wildcard hidden files. This new parameter should be documented in help page.

Details

Example 1

HIdden files(in this case .git folder) are not shown without -Force. This is current behaviour.

> Resolve-Path -Path .git*

Path
----
C:\Users\armaa\Documents\git-repos\PowerShell\.github
C:\Users\armaa\Documents\git-repos\PowerShell\.gitattributes
C:\Users\armaa\Documents\git-repos\PowerShell\.gitignore

> Convert-Path -Path .git*
C:\Users\armaa\Documents\git-repos\PowerShell\.github
C:\Users\armaa\Documents\git-repos\PowerShell\.gitattributes
C:\Users\armaa\Documents\git-repos\PowerShell\.gitignore

Example 2

All HIdden files(in this case including .git folder) are shown with -Force. This is new behaviour.

> Resolve-Path -Path .git* -Force

Path
----
C:\Users\armaa\Documents\git-repos\PowerShell\.git
C:\Users\armaa\Documents\git-repos\PowerShell\.github
C:\Users\armaa\Documents\git-repos\PowerShell\.gitattributes
C:\Users\armaa\Documents\git-repos\PowerShell\.gitignore

> Convert-Path -Path .git* -Force
C:\Users\armaa\Documents\git-repos\PowerShell\.git
C:\Users\armaa\Documents\git-repos\PowerShell\.github
C:\Users\armaa\Documents\git-repos\PowerShell\.gitattributes
C:\Users\armaa\Documents\git-repos\PowerShell\.gitignore

Articles

  • reference/7.4/Microsoft.PowerShell.Management/Resolve-Path.md
  • reference/7.4/Microsoft.PowerShell.Management/Convert-Path.md

Related Source Pull Requests

Related Source Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-doc-ideaIssue - request for new content

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions