Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Compare characters of filename with text in file

$
0
0

Hi,

I have some semicolon-separated files which have the names randomName_FixedName.txt, where the randomName is unique for each file and FixedName.txt is the same for all files.

Inside these text semicolon-separated files it looks like this: text1;"text2;"text3";"text4";

What I would like to do, is to compare the randomName from the filename with the text2 inside the file, and if these doesnt match write some output.

How can I do this?

Thanks!


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>