Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Why "where" condition does not result correct?

$
0
0

Hi, I have a files lines of file names, like:

file1.txt
File2.txt
FILE3.txt
FILE4.TXT

I run a commnad below:

cat \\share\file.txt | where { $_.ToUpper().Split(“.”)[0] -ne $_.Split(“.”)[0] }

But, it does not result with expected result, that is:

file1.txt
File2.txt

Why? Can someone help me?

Regards


Viewing all articles
Browse latest Browse all 13067

Trending Articles