Windows Vista Forums

How can I Write-Host the current directory?
  1. #1


    ssg31415926 Guest

    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

  2. #2


    Shay Levy [MVP] Guest

    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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display differences Write-Host and Write-Warning TreyS PowerShell 1 01 Jan 2010
Difference in getting the current exe directory Kakkanattu .NET General 2 25 Jun 2008
bug in join-path when the current directory is used Bob Landau PowerShell 4 28 Aug 2007
how do I keep powershells current directory and dotnets current directory in sync Harald Ums \(2179630\) PowerShell 1 21 Jun 2007
Manipulating current directory as a variable =?Utf-8?B?UmFsaXNo?= PowerShell 3 28 Aug 2006