title: How to distinguish a file from a directory in command prompt (cmd)?
body: <p>I need to write a script based on whether what I am reading is a file or directory. Basically I have a txt file which contains paths of files + directories, I am reading this file as follows:  <code>FOR /f %%i IN (root.txt) DO (call :output %%i)</code> </p>
  
  <p>I need to call :output which will output only the files contained in the txt file.
  so if root.txt contains:</p>
  
  <blockquote>
    <p>C:\TEST<br>
     C:\TEST\test.txt<br>
     C:\TEST\TEST2\test2.txt</p>
  </blockquote>
  
  <p>The output should be: </p>
  
  <blockquote>
    <p>C:\TEST\test.txt<br>
    C:\TEST\TEST2\test2.txt</p>
  </blockquote>