I want to create a batch file which will parse through a given directory and get me all XML files.
These XML file names are to be stored in a text file.
I want to create a batch file which will parse through a given directory and get me all XML files.
These XML file names are to be stored in a text file.
try the FOR
command. Read the usage information first, try HELP FOR
. Then, experiment with this examples:
FOR %%a in (*.xml) DO ECHO %%a >>xmllist.txt
or
FOR /R %%a in (*.xml) DO ECHO %%a >>xmllist.txt
or
FOR /R %%a in (*.xml) DO ECHO %%~na >>xmllist.txt
and choose what fits better with your requirements