title: Test-Path and msi files
body: <p>I was reviewing <a href="https://stackoverflow.com/questions/46790681/test-path-in-local-directory">this question</a> and noticed something I did not understand.</p>
  
  <p>Consider this folder with one msi file and one txt file.  Why does Test-Path return false for the msi files? I am expecting $True for both test-path cmdlets because those files are in the folder.</p>
  
  <pre><code>$fldr = 'C:\AMD\WU-CCC2\ccc2_install\CN\amddvr\amddvr64'
  $file = 'eval.msi'
  $fullPath = Join-Path -Path $fldr -ChildPath $file
  
  Write-Host '   Testing Path to ' $fullPath
  
  Set-Location -Path $fldr
      Test-Path  -LiteralPath $fullPath
  
  
  set-location -Path c:\
      Test-Path  -LiteralPath $fullPath 
  
  
  $file = 'me.txt'
  $fullPath = Join-Path -Path $fldr -ChildPath $file
  
  Write-Host '   Testing Path to ' $fullPath
  
  Set-Location -Path $fldr
      Test-Path  -LiteralPath $fullPath
  
  set-location -Path c:\
      Test-Path  -LiteralPath $fullPath 
  </code></pre>
  
  <p>this is the output</p>
  
  <pre><code>   Testing Path to  C:\AMD\WU-CCC2\ccc2_install\CN\amddvr\amddvr64\eval.msi
  False
  False
     Testing Path to  C:\AMD\WU-CCC2\ccc2_install\CN\amddvr\amddvr64\me.txt
  True
  True
  </code></pre>
  
  <p>As Requested in the comments:</p>
  
  <pre><code>ls $fldr
  ls $fldr | % { '-{0}-' -f $_.name }
  </code></pre>
  
  <p>Returns the following:</p>
  
  <pre><code>Directory: C:\AMD\WU-CCC2\ccc2_install\CN\amddvr\amddvr64
  
  
  Mode                LastWriteTime         Length Name                                                                                                                              
  ----                -------------         ------ ----                                                                                                                              
  -a----        9/27/2017   3:03 PM        8945664 amddvr64.msi                                                                                                                      
  -a----       10/17/2017   6:21 AM              6 me.txt           
  </code></pre>
  
  <p>and</p>
  
  <pre><code>   -amddvr64.msi-
     -me.txt- 
  </code></pre>