title: compare 2 arrays and wrap the output in quotes using powershell
body: <p>In a directory there will be 2 type of files with same name but different extension for eg:1.png , 1.txt, test_76.png,test_76.txt, test_70.png. In this case test_70.png dosent have its .txt counterpart.I am using this code</p>
  
  <pre><code>$scL = dir *.txt | select Basename 
  $SList = @($scL -notmatch "MICRO")
  
  $pList = dir *.png | select Basename
  $PList = @($pList -notmatch "MICRO")
  
  Compare-Object $PList $SList | ForEach-Object {$_.InputObject} | out-file result.txt
  </code></pre>
  
  <p>but i am unable to get the desired output that is test_70.png in the output file.Also i want to wrap the output inside the text file in double quotes i.e; the outfile should contain entry like this "test_70.png". Can anyone throw light on what am i missing in the compare-object cmdlet.</p>