I'm currently working in PowerShell and I'm located in my module file at `PS C:Usersrodkrmicroblogapp`. I need to navigate back one step to get to the project root at `PS C:Usersrodkrmicroblog`. Is there a command that will allow me to do this without going all the way back to the root directory? Also, if anyone has suggestions for a list of commands for navigating Windows directories effectively, that would be awesome!
3 Answers
If you're looking to get the parent directory programmatically, you could use `split-path -parent $scriptPath`.
You can simply use `cd ..` to go back one directory. That's the standard way to move up one level in PowerShell!
Hey, thanks! That worked perfectly!
For good resources on cmdlets, check out [ss64.com/ps/](https://ss64.com/ps/). They have a lot of useful commands listed. Specifically for moving around, visit [ss64.com/nt/cd.html](https://ss64.com/nt/cd.html).
Hey, thanks a lot for the suggestion! I'll definitely check it out.
Wow, this is exactly what I needed! Thank you for sharing these links!
Ok cool. Hey thanks for that tip!