In Windows there is a better tool that is installed in advance. It is called vbscript (and later Powershell). Why don't you use vbscript.
strFolder="c:\test"
Set objFS = CreateObject( "Scripting.FileSystemObject" )
Set objFolder = objFS.GetFolder(strFolder)
s=""
For Each strFile In objFolder.Files
s=s & strFile & vbCrLf
Next
WScript.Echo s
s ( dir). , . (cmd.exe ..)