Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - How can I Write-Host the current directory?

Reply
 
Old 09-03-2008   #1 (permalink)
ssg31415926


 
 

How can I Write-Host the current directory?

To diagnose where I am in a script that trundles up and down a
directory structure, I want to Write-Host the current directory at
various points. Is it possible to do this?

My System SpecsSystem Spec
Old 09-03-2008   #2 (permalink)
Shay Levy [MVP]


 
 

Re: How can I Write-Host the current directory?


Write-Host $pwd

- or -

Write-Host (Get-Location)



---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic

s> To diagnose where I am in a script that trundles up and down a
s> directory structure, I want to Write-Host the current directory at
s> various points. Is it possible to do this?
s>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Difference in getting the current exe directory .NET General
bug in join-path when the current directory is used PowerShell
how do I keep powershells current directory and dotnets current directory in sync PowerShell
Executing scripts in the current directory PowerShell
Manipulating current directory as a variable PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46