Quantcast
Channel: How can one show the current directory in PowerShell? - Super User
Browsing latest articles
Browse All 7 View Live

Answer by tedro for How can one show the current directory in PowerShell?

To show only the current directory in PowerShell (or pwsh), put this in your profile.ps1:function prompt { 'PS - '+ (get-item .).name +'>' }

View Article



Answer by Luis Gouveia for How can one show the current directory in PowerShell?

(Get-Item -Path ".\").FullName

View Article

Answer by kayleeFrye_onDeck for How can one show the current directory in...

Nowadays, this works fine:echo "$PWD"which works differently thanecho $PWDJust don't forget the quotes :) Sample output below.PS C:\Users\user name> echo $PWDPath----C:\Users\user namePS...

View Article

Answer by Jitendra for How can one show the current directory in PowerShell?

Try the following:$CurrentDir = $(get-location).Path;

View Article

Answer by bfhd for How can one show the current directory in PowerShell?

Check this out: http://mshforfun.blogspot.com/2006/05/perfect-prompt-for-windows-powershell.htmlBasically, you can create a 'profile' file called Microsoft.PowerShell_profile.ps1 which will run every...

View Article


Answer by John T for How can one show the current directory in PowerShell?

Simple, add the following to your profile.ps1 file (under your My Documents\WindowsPowerShell folder):function prompt { "$pwd>" }

View Article

How can one show the current directory in PowerShell?

I'd like to have the current working directory show on the powershell command line, as would be done in a (for example) CMD prompt. How can I do so?

View Article
Browsing latest articles
Browse All 7 View Live




Latest Images