how to use batch files to automate test command line applications.
I have questions on testing one command line application, the application can list all the files( under one directory in DESC order), it also list the sub-directory, it take the directory name as input, in the command line run “listf.exe dirname”. just like unix command: "ls –Rlr dirName", now I need create test cases to test it, then use doc batch file to automate test all test cases, can anyone please help?

all I can think is have some test cases, like:
@echo off
Listf.exe "C:\Program Files" > C:\list_of_program_files.txt
Listf.exe "" > C:\list_of__files.txt
Listf.exe "ssss" > C:\list_of_ssss_files.txt
rem ssss is not exist
Listf.exe "file_name" > C:\list_of_file_name_files.txt
rem file_name is a file not DIR

then how do I automate all the test cases? should use fc to compare the output?