Title: Can't cd to path copied from Windows Explorer · Issue #21013 · PowerShell/PowerShell · GitHub
Open Graph Title: Can't cd to path copied from Windows Explorer · Issue #21013 · PowerShell/PowerShell
X Title: Can't cd to path copied from Windows Explorer · Issue #21013 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/21013
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't cd to path copied from Windows Explorer","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\n1) `mkdir \"$HOME\\[TEST] Directory\"`\r\n2) Do \"copy as path\" from Windows Explorer on this directory.\r\n3) Do `cd \"C:\\Users\\user\\[TEST] Directory\"`\r\n\r\n### Expected behavior\r\n\r\n```console\r\nDirectory changed to \"C:\\Users\\user\\[TEST] Directory\"\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\n❯ cd \"C:\\Users\\user\\[TEST] Directory\"\r\nSet-Location: Cannot find path 'C:\\Users\\user\\[TEST] Directory' because it does not exist.\r\n```\r\n\r\n\r\n### Error details\r\n\r\n```console\r\n❯ Get-Error\r\n\r\nException :\r\n Type : System.Management.Automation.ItemNotFoundException\r\n ErrorRecord :\r\n Exception :\r\n Type : System.Management.Automation.ParentContainsErrorRecordException\r\n Message : Cannot find path 'C:\\Users\\user\\[TEST] Directory' because it does not exist.\r\n HResult : -2146233087\r\n TargetObject : C:\\Users\\user\\[TEST] Directory\r\n CategoryInfo : ObjectNotFound: (C:\\Users\\user\\[TEST] Directory:String) [], ParentContainsErrorRecordException\r\n FullyQualifiedErrorId : PathNotFound\r\n ItemName : C:\\Users\\user\\[TEST] Directory\r\n SessionStateCategory : Drive\r\n TargetSite :\r\n Name : SetLocation\r\n DeclaringType : System.Management.Automation.SessionStateInternal, System.Management.Automation, Version=7.4.0.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35\r\n MemberType : Method\r\n Module : System.Management.Automation.dll\r\n Message : Cannot find path 'C:\\Users\\user\\[TEST] Directory' because it does not exist.\r\n Source : System.Management.Automation\r\n HResult : -2146233087\r\n StackTrace :\r\n at System.Management.Automation.SessionStateInternal.SetLocation(String path, CmdletProviderContext context, Boolean literalPath)\r\n at Microsoft.PowerShell.Commands.SetLocationCommand.ProcessRecord()\r\nTargetObject : C:\\Users\\user\\[TEST] Directory\r\nCategoryInfo : ObjectNotFound: (C:\\Users\\user\\[TEST] Directory:String) [Set-Location], ItemNotFoundException\r\nFullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand\r\nInvocationInfo :\r\n MyCommand : Set-Location\r\n ScriptLineNumber : 1\r\n OffsetInLine : 1\r\n HistoryId : 10\r\n Line : cd 'C:\\Users\\user\\[TEST] Directory'\r\n Statement : cd 'C:\\Users\\user\\[TEST] Directory'\r\n PositionMessage : At line:1 char:1\r\n + cd 'C:\\Users\\user\\[TEST] Directory'\r\n + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n InvocationName : cd\r\n CommandOrigin : Internal\r\nScriptStackTrace : at \u003cScriptBlock\u003e, \u003cNo file\u003e: line 1\r\nPipelineIterationInfo :\r\n```\r\n\r\n\r\n### Environment data\r\n\r\n```powershell\r\n❯ echo $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.4.0\r\nPSEdition Core\r\nGitCommitId 7.4.0\r\nOS Microsoft Windows 10.0.22631\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\n\r\n","author":{"url":"https://github.com/soredake","@type":"Person","name":"soredake"},"datePublished":"2024-01-06T13:14:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/21013/PowerShell/issues/21013"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e4fff4a6-9f8c-3513-10c3-7dc83b11cf0b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0E2:3D0DAC:5833DC3:7BB3215:6A57253D |
| html-safe-nonce | 40eda79abc69715d40c5e08130611c4d4499b4b3594bf46493d0ecba7fddaaa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEUyOjNEMERBQzo1ODMzREMzOjdCQjMyMTU6NkE1NzI1M0QiLCJ2aXNpdG9yX2lkIjoiMTQ3NTAyMjM3Njg5MTAwMDEyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4d9e348abad2c74e59f984df5e85d3749eceba4a828f3e83c20aa24705824464 |
| hovercard-subject-tag | issue:2068621192 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/21013/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58541c942b2ef2e21319bfe3db2f7d59ebfc74707f3aafd5d0898484a30cbfdb/PowerShell/PowerShell/issues/21013 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58541c942b2ef2e21319bfe3db2f7d59ebfc74707f3aafd5d0898484a30cbfdb/PowerShell/PowerShell/issues/21013 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | soredake |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2576d1f0198cf1588faf2edf27f1ed120903be10 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width