Skip to content

Document new -Extension parameter for Join-Path cmdlet #12535

@yotsuda

Description

@yotsuda

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 new parameter to Join-Path cmdlet to enable adding, changing, or removing file extensions.
The new parameter -Extension needs to be documented.

Details

Example 1: Add extension to file without extension

Join-Path C:\Temp myfile -Extension txt
# Returns: C:\Temp\myfile.txt

Example 2: Change existing extension

Join-Path C:\Temp myfile.txt -Extension .log
# Returns: C:\Temp\myfile.log

Example 3: Extension without leading dot

Join-Path C:\Temp file.txt -Extension log
# Returns: C:\Temp\file.log

Example 4: Remove extension with empty string

Join-Path C:\Temp file.txt -Extension ""
# Returns: C:\Temp\file

Articles

  • reference/7.6/Microsoft.PowerShell.Management/Join-Path.md

Related Source Pull Requests

Related Source Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-managementArea - Microsoft.PowerShell.Management modulehold-for-releaseWaiting - for next releaseissue-doc-ideaIssue - request for new content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions