How to distinguish a file from a directory in command prompt (cmd) ?
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:  FOR /f %%i IN (root.txt) DO (call :output %%i) 

I need to call :output which will output only the files contained in the txt file.
so if root.txt contains:
C:\TEST
C:\TEST\test.txt
C:\TEST\TEST2\test2.txt

The output should be: 
C:\TEST\test.txt
C:\TEST\TEST2\test2.txt

How to distinguish a file from a directory in command prompt (cmd) ?
===

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:  FOR /f %%i IN (root.txt) DO (call :output %%i) 

I need to call :output which will output only the files contained in the txt file.
so if root.txt contains:
C:\TEST
C:\TEST\test.txt
C:\TEST\TEST2\test2.txt

The output should be: 
C:\TEST\test.txt
C:\TEST\TEST2\test2.txt
