René's URL Explorer Experiment


Title: Fix New-Item -Path/-Target with wildcard char by kwkam · Pull Request #9259 · PowerShell/PowerShell · GitHub

Open Graph Title: Fix New-Item -Path/-Target with wildcard char by kwkam · Pull Request #9259 · PowerShell/PowerShell

X Title: Fix New-Item -Path/-Target with wildcard char by kwkam · Pull Request #9259 · PowerShell/PowerShell

Description: Reopen #7404 PR Summary Unescape non-literal path when -Name is not set. Fix failure with symlink/junction target which contains special character. PR Context This works around for New-Item treating -Path as literal path while it can also be globbable. For example, assuming there is "[file]1" in current directory, and tab completion suggests './`[file`]1' for the -Path argument, but New-Item -Path './`[file`]2' will create a file named "`[file`]2" instead of "[file]2". Also fixes an issue that New-Item does not handle -Target properly when it contains escaped wildcard character. For example, there is a directory "[dir]1" in current directory, and tab completion suggests './`[dir`]1' for the -Target argument, but New-Item -Type Junction -Path './`[dir`]2' -Target './`[dir`]1' will complain that it cannot find the item. PR Checklist PR has a meaningful title Use the present tense and imperative mood when describing your changes Summarized changes Change is not breaking Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header This PR is ready to merge and is not Work in Progress. If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready. User-facing changes Not Applicable OR Documentation needed Issue filed: Testing - New and feature N/A or can only be tested interactively OR Make sure you've added a new test if existing tests do not effectively test the code changed

Open Graph Description: Reopen #7404 PR Summary Unescape non-literal path when -Name is not set. Fix failure with symlink/junction target which contains special character. PR Context This works around for New-Item treat...

X Description: Reopen #7404 PR Summary Unescape non-literal path when -Name is not set. Fix failure with symlink/junction target which contains special character. PR Context This works around for New-Item treat...

Opengraph URL: https://github.com/PowerShell/PowerShell/pull/9259

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e723e6b6-dcff-f1d8-6d10-27c2f7f1a565
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD3C:20CC71:48C6AD:621076:6A5CC5CF
html-safe-nonce222f400f9d089e3fbd4870fff674293873951bcab2eee6b86a199c6c6a730165
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDNDOjIwQ0M3MTo0OEM2QUQ6NjIxMDc2OjZBNUNDNUNGIiwidmlzaXRvcl9pZCI6IjU2NDgyMTE0MTU3MjExMDA3NTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4ba02561d36e2615d366d1d35e6c0e29fcd73fb94629ddb712dbb5c002f7b185
hovercard-subject-tagpull_request:265989861
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/pull/9259/files
twitter:imagehttps://avatars.githubusercontent.com/u/16373649?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/16373649?s=400&v=4
og:image:altReopen #7404 PR Summary Unescape non-literal path when -Name is not set. Fix failure with symlink/junction target which contains special character. PR Context This works around for New-Item treat...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/pull/9259/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fpull%2F9259%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fpull%2F9259%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/pull/9259/files
Reloadhttps://github.com/PowerShell/PowerShell/pull/9259/files
Reloadhttps://github.com/PowerShell/PowerShell/pull/9259/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/9259/files
PowerShell https://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Notifications https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Fork 8.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Star 54.4k https://github.com/login?return_to=%2FPowerShell%2FPowerShell
Code https://github.com/PowerShell/PowerShell
Issues 1.3k https://github.com/PowerShell/PowerShell/issues
Pull requests 289 https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality 3 https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Code https://github.com/PowerShell/PowerShell
Issues https://github.com/PowerShell/PowerShell/issues
Pull requests https://github.com/PowerShell/PowerShell/pulls
Discussions https://github.com/PowerShell/PowerShell/discussions
Actions https://github.com/PowerShell/PowerShell/actions
Projects https://github.com/PowerShell/PowerShell/projects
Security and quality https://github.com/PowerShell/PowerShell/security
Insights https://github.com/PowerShell/PowerShell/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FPowerShell%2FPowerShell%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPowerShell%2FPowerShell%2Fissues%2Fnew%2Fchoose
kwkamhttps://github.com/kwkam
PowerShell:masterhttps://github.com/PowerShell/PowerShell/tree/master
kwkam:wc-newitemhttps://github.com/kwkam/PowerShell/tree/wc-newitem
Conversation 18 https://github.com/PowerShell/PowerShell/pull/9259
Commits 10 https://github.com/PowerShell/PowerShell/pull/9259/commits
Checks 0 https://github.com/PowerShell/PowerShell/pull/9259/checks
Files changed https://github.com/PowerShell/PowerShell/pull/9259/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/9259/files
Fix New-Item -Path/-Target with wildcard char https://github.com/PowerShell/PowerShell/pull/9259/files#top
Show all changes 10 commits https://github.com/PowerShell/PowerShell/pull/9259/files
0d37aae [Feature] Fix New-Item -Path with wildcard char kwkam Jul 30, 2018 https://github.com/PowerShell/PowerShell/pull/9259/commits/0d37aaef73f1217d1a4d7221023a934ecb706b72
38222e8 Add test kwkam Aug 12, 2018 https://github.com/PowerShell/PowerShell/pull/9259/commits/38222e895d7185207804cafd3b61bdbc403c7f3d
97aca06 Use named parameters in New-Item test kwkam Aug 31, 2018 https://github.com/PowerShell/PowerShell/pull/9259/commits/97aca064e59350d16d8814bbfb7976618d0a1263
80b5673 Cosmetic change on Remove-Item.Tests kwkam Jan 11, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/80b56736d2202f32e827284d4638523ee73fe690
e3ee292 Suppress New-Item output in test iSazonov Apr 1, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/e3ee2920d576709b02492c72c9986b38a9270562
582f67d Use BeExactly instead of Match in test kwkam May 5, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/582f67d627965984715a5b3fc51978859629aec1
84a23ed Use Get-Item instead of Get-ChildItem kwkam May 5, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/84a23edac48590ef79ae7a54c04b9840c300c982
581dd2a Fix symlink target kwkam May 7, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/581dd2a278e69d5e24f9f0f0d992d7d69c2a6484
bf08aad Prepend dot to relative path kwkam May 8, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/bf08aad27e8296d231aef78e11df854f6226e3af
258e2cd Use char in StartsWith kwkam May 8, 2019 https://github.com/PowerShell/PowerShell/pull/9259/commits/258e2cd57f56ed2bbf0d2ab92182b4cadbb37c2d
Clear filters https://github.com/PowerShell/PowerShell/pull/9259/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/9259/files
Please reload this pagehttps://github.com/PowerShell/PowerShell/pull/9259/files
SessionStateContainer.cs https://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
New-Item.Tests.ps1 https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
Remove-Item.Tests.ps1 https://github.com/PowerShell/PowerShell/pull/9259/files#diff-cbc19f2a6ea2fe38f09051b298b1ee3e7a55c901ea54f2be85c91f2d14d52b6c
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
src/System.Management.Automation/engine/SessionStateContainer.cshttps://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
View file https://github.com/kwkam/PowerShell/blob/258e2cd57f56ed2bbf0d2ab92182b4cadbb37c2d/src/System.Management.Automation/engine/SessionStateContainer.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/9259/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-aada1d7e70a74e6c20a99da5f7382aeab09a85f6d4da928966e6d4c19a55303e
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
View file https://github.com/kwkam/PowerShell/blob/258e2cd57f56ed2bbf0d2ab92182b4cadbb37c2d/test/powershell/Modules/Microsoft.PowerShell.Management/New-Item.Tests.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/9259/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-5af7acbd521be5eee8cf8095c50be656f96bf6fdf4c7d9bf0642655fc6495994
https://github.com/PowerShell/PowerShell/blob/master/.github/CODEOWNERS#L7
test/powershell/Modules/Microsoft.PowerShell.Management/Remove-Item.Tests.ps1https://github.com/PowerShell/PowerShell/pull/9259/files#diff-cbc19f2a6ea2fe38f09051b298b1ee3e7a55c901ea54f2be85c91f2d14d52b6c
View file https://github.com/kwkam/PowerShell/blob/258e2cd57f56ed2bbf0d2ab92182b4cadbb37c2d/test/powershell/Modules/Microsoft.PowerShell.Management/Remove-Item.Tests.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PowerShell/pull/9259/{{ revealButtonHref }}
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-cbc19f2a6ea2fe38f09051b298b1ee3e7a55c901ea54f2be85c91f2d14d52b6c
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-cbc19f2a6ea2fe38f09051b298b1ee3e7a55c901ea54f2be85c91f2d14d52b6c
https://github.com/PowerShell/PowerShell/pull/9259/files#diff-cbc19f2a6ea2fe38f09051b298b1ee3e7a55c901ea54f2be85c91f2d14d52b6c
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.