I know there are already some threads on this, but i dont get it...
ive got a list of file locations from a sql and extract them:
$results = --SQL QUERY--
$result = $results | select Dateipfad, Pfad, Datei, etc...
$dateipfad = $result | select Dateipfad
$dateipfad
Dateipfad |
---|
\\fs-srv01\folder1\folder2\file1.pdf |
\\fs-srv01\folder1\folder2\file2.pdf |
\\fs-srv01\folder1\folder2\file3.pdf |
\\fs-srv01\folder1\folder2\file4.pdf |
and when testing with Test-Path -Path $Dateipfad i get:
False
False
False
False
but when i use Test-Path -Path '\\fs-srv01\folder1\folder2\file4.pdf' its always true