title: Read file name from a list, find its count and redirect both file name and count to another file in windows cmd
body: <p>I am a beginner in windows scripting and finding it difficult to achieve the below scenario. Any help would be highly appreciated. Thanks in advance</p>
  
  <p>I have an input file with list of file name 
  eg : <code>InputFileName.txt</code></p>
  
  <pre><code>E:\ABC\File*.csv
  E:\ABC\CDF\list.txt
  </code></pre>
  
  <p>( ie files can be present in any directory and also file names need not be accurate. It can have wildcards, so that the matched file needs to be picked)</p>
  
  <p>Steps:</p>
  
  <p>I need to get the count of each individual file listed in InputFileName.txt and write the file name in list,actual file name and its count to another file excluding blank line (or even to table).</p>
  
  <p>Output should look like</p>
  
  <pre><code>E:\ABC\File*.csv,E:\ABC\File20191008.csv,200
  E:\ABC\CDF\list.txt,E:\ABC\CDF\list.txt,300
  </code></pre>
  
  <p>Code I have just write the count to another file.Tried multiple things but not able to get the first 2 fields I need.</p>
  
  <p>Code :</p>
  
  <pre><code>For /F "tokens=*" %%A in ( 'type E:\dir1\InputFileName.txt) do (
  findstr /R . %%A | find /c /v "" &gt;&gt;E:\dir1\OutputFileName.txt)
  </code></pre>