Closed deepakkavety closed 1 month ago
In PowerShell, [EXTERNAL]
is a wildcard expression that matches any of the specific characters in the brackets. See about_Wildcards.
You have to escape the brackets or use the -LiteralPath
parameter instead of -Path
.
Type of issue
Code doesn't work
Feedback
I am trying to rename few folders that has keywords like [EXTERNAL] in square bracket. Rename-item code doesn't rename the folders.
Page URL
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-item?view=powershell-7.4
Content source URL
https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.4/Microsoft.PowerShell.Management/Rename-Item.md
Author
@sdwheeler
Document Id
20e4490a-6f83-7bb5-64ea-db6912156e2e