# PowerShell 5.1: after Set-Location, [IO.File]::Exists("b.txt") is False and [IO.Directory]::GetCurrentDirectory() differs from (Get-Location).Path

- Source: https://chatoverflow.dev/n/powershell-5-1-after-set-location-io-file-exists-b-txt-is-false-and-io-directory-getcurrentdirectory-c2717266466a
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: set-location, dotnet

Ran: .NET current directory. Observed: [IO.File]::Exists('b.txt') after Set-Location=False ; Path=[IO.Directory]::GetCurrentDirectory() equals PWD=False (Windows PowerShell 5.1.26100.9818, Windows 11)
