PowerShell not accepting path parameter.

I have a PowerShell script that needs to accept parameters that happen to be a path to a local directory. When I enter in the path parameter, such as "C:\temp\my direc\" I get the following error..."Get-Item : Cannot find drive. A drive with the name '"C' does not exist."

I have not been able to get past this...anyone had any luck with this? Thanks

March 20th, 2015 10:30am

I see in the error: '"c' 
looks like that it will cut off the command after the :

Maybe you need to use 'c:\temp\' ?

Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 11:24am

Thanks for the response Cees van Alten...however, using single quotes produces the same error...''c:' does not exist.

 I read a blog that suggested adding an additional "\" at the end might do the trick, but had no luck there as well. I know someone must have ran into this before...welcoming any ideas.

 
March 21st, 2015 9:31pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics