1.    11 Sep 2017 #1
    Join Date : Aug 2015
    Posts : 78
    Windows 10

    Annoying error in PowerShell


    I have a directory E:\Documents\Steve's\New Documents\Tax
    If I navigate to this directory in explorer, and then use the File->Open Windows Powershell mechanism, then Windows PowerShell opens with the error:

    The string is missing the terminator: '. + CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

    There's nothing wrong with a single quote character in a directory, so this must be an error in Powershell.

    Is that correct?
      My ComputerSystem Spec
  2.    11 Sep 2017 #2
    Join Date : Dec 2015
    Posts : 6,013
    Windows10

    Quote Originally Posted by Swifty View Post
    I have a directory E:\Documents\Steve's\New Documents\Tax
    If I navigate to this directory in explorer, and then use the File->Open Windows Powershell mechanism, then Windows PowerShell opens with the error:

    The string is missing the terminator: '. + CategoryInfo : ParserError: ( [], ParentContainsErrorRecordException + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

    There's nothing wrong with a single quote character in a directory, so this must be an error in Powershell.

    Is that correct?
    You need double quotes around filename "E:\Documents\Steve's\New Documents\Tax".


    Click image for larger version. 

Name:	image.png 
Views:	18 
Size:	3.5 KB 
ID:	152768
      My ComputerSystem Spec
  3.    11 Sep 2017 #3
    Join Date : Aug 2016
    S/E England
    Posts : 4,549
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by cereberus View Post
    You need double quotes around filename "E:\Documents\Steve's\New Documents\Tax".
    Any idea how to do that when opening Powershell from File Explorer's 'File' tab as the OP is trying to do? Or with the Shift+RightClick context menu?
      My ComputersSystem Spec
  4.    11 Sep 2017 #4
    Join Date : Aug 2015
    Posts : 78
    Windows 10
    Thread Starter

    Quote Originally Posted by cereberus View Post
    You need double quotes around filename "E:\Documents\Steve's\New Documents\Tax".

    I'm not the one issuing the CD command. I'm using the option inside the "File" entry in Windows Explorer, all done with a couple of mouse clicks...
    Perhaps it's Windows Explorer which needs to punctuate the command it uses to open Pwershell at my directory.

    Try it for yourself:

    1. Open Windows Explorer
    2. Navigate to a directory of your choice
    3. Create a new directory, maybe "cereberus's"
    4. Navigate to this new directory
    5. Click the "File" entry in Explorer's ribbon
    6. Click "Open Windows Powershell"
    7. Marvel at the error message...

      My ComputerSystem Spec
  5.    11 Sep 2017 #5
    Join Date : Dec 2015
    Posts : 6,013
    Windows10

    Quote Originally Posted by Swifty View Post
    I'm not the one issuing the CD command. I'm using the option inside the "File" entry in Windows Explorer, all done with a couple of mouse clicks...
    Perhaps it's Windows Explorer which needs to punctuate the command it uses to open Pwershell at my directory.

    Try it for yourself:

    1. Open Windows Explorer
    2. Navigate to a directory of your choice
    3. Create a new directory, maybe "cereberus's"
    4. Navigate to this new directory
    5. Click the "File" entry in Explorer's ribbon
    6. Click "Open Windows Powershell"
    7. Marvel at the error message...

    [/COLOR]
    Yeah obviously a silly bug.

    I guess quickest way to avoid typing long names is to

    1) navigate to folder

    2) click on directory icon in name bar

    Click image for larger version. 

Name:	image.png 
Views:	14 
Size:	3.9 KB 
ID:	152779

    which yields

    Click image for larger version. 

Name:	image.png 
Views:	14 
Size:	1.7 KB 
ID:	152780
    3) Press ctrl-c to pu on clipboard.

    Then open powershell and type CD " , paste clipboard and type final ".
    Attached Thumbnails Attached Thumbnails image.png  
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
That annoying 0x800704cf error...
This is something I see with every fresh installation of Windows 8 and later. I have a file server, called FILES, which is a Windows 8.1 Pro machine with a bunch of shared folders. I use several Windows 10 Pro machines to connect to these shares...
Network and Sharing
Solved Windows 10 Powershell DISM RestoreHealth error 0x800f081f
Hello everyone. This is my first time here so I'm hoping I'm in the right section and that the title is clear and all that. So basically I had some trouble with viruses a while back. I did manage to get rid of them (I think) but my PC has been a bit...
Performance & Maintenance
Access Denied while clearing Event Viewer error in Powershell
I am trying to cleat all the events in my event viewer as I had so many errors in the past 7 days. I opened powershell & ran as administrator & use this command wevtutil el | Foreach-Object {wevtutil cl $_} & I had some access denied errors....
General Support
the annoying 0xc000007b error
hi . i ve recently installed a windows 10 and every time i try to run a game this error happens 0xc000007b and i ve directx 12 & netframe 4.5 or 4.6 idk " latest version " & and the VCredist and i ve done every thing to do with the "DLL"s move them...
Gaming
Cant fix crashing modern apps due to odd powershell error
Can someone tell what the powershell errors means? when i put this commend ((Get-ChildItem "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\InboxApplications") | Get-ItemProperty).Path | Add-AppxPackage -Register...
Software and Apps
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 04:46.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums