Replacement for `pwd` in Windows PowerShell

user2879237 picture user2879237 · Feb 18, 2014 · Viewed 17.5k times · Source

I have a Unix script which uses the command

Current_Dir=`pwd`

What would be the suitable replacement for it in Windows Power shell script?

Answer

JaredPar picture JaredPar · Feb 18, 2014

Use the $pwd.Path expression

write-host $pwd.Path