Posted: 11/4/2012 7:54:17 AM EDT
|
I posted a thread a week or so ago about programming, well I am trying to get some basics down. I am currently having an issue with powershell, I have messed around with it doing basic commands. Right now I am trying to just change my directory and it won't let me go into certain ones and I can't figure out why. I can get into some but not others.
For example I can go into C:\Users\Username\documents but cannot get in to C:\Program Files? This is the error I get Set-Location : A positional parameter cannot be found that accepts argument 'file'. I don't recall having this problem when I was messing around with python. Also my computer is setup with a SSD for the OS and a few other programs like MS Office everything else is run off the D drive which some registry edits were made. So far I have had no issues with this computer and I am pretty sure this issue is new and not related to that. I am thinking of buying this book to read Learn Powershell In a Month of Lunches |
|
Quoted: I'm guessing the problem with going into the Program Files folder is the space. Try putting quotes around the entire path. Yarp. PS C:\> cd program files Set-Location : A positional parameter cannot be found that accepts argument 'files'. At line:1 char:3 + cd <<<< program files + CategoryInfo : InvalidArgument: (:) [Set-Location], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand PS C:\> cd "program files" PS C:\program files> |
|
Quoted:
I'm guessing the problem with going into the Program Files folder is the space. Try putting quotes around the entire path. Quoted:
Quoted:
I'm guessing the problem with going into the Program Files folder is the space. Try putting quotes around the entire path. Yarp. PS C:\> cd program files Set-Location : A positional parameter cannot be found that accepts argument 'files'. At line:1 char:3 + cd <<<< program files + CategoryInfo : InvalidArgument: (:) [Set-Location], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand PS C:\> cd "program files" PS C:\program files> Thanks guys! that worked. If you don't mind one more question. I am trying to run the simple HelloWorldApp and i cannot set my system variable path. I went in to set it but I don't think it is right. So I am unable to compile the program to run. I have downloaded the JDK 7 in my D drive so the path is D:\Program Files\Java\jdk1.7.0_09\bin I tried setting the system variable path through windows, I'm doing something wrong obviously. The instructions I had online didn't work either and I have no idea on how to set it through powershell. Any thoughts on that book? |