Skip to content

Move-Item fails while using a wildcard in destination  #20521

Closed
@PietJankbal

Description

@PietJankbal

Prerequisites

Steps to reproduce

Encountered in a script I'd like to use. Easy way to reproduce is like:

cd c:\users\my_name

$null > filename

Move-Item .\filename "C:\users\my_name\Deskto*"

Error: Move-Item: Invalid name.

In Powershell 5.1 this command succeeds just fine

Expected behavior

The file is moved to c:\users\my_name\Desktop

Actual behavior

Error: Move-Item: Invalid name.

Error details

none

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.5

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-By DesignThe reported behavior is by design.WG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions