Possible Duplicate:
How do you loop through each line in a text file using a windows batch file?
Need to use a large list of file names to construct an argument that goes to an application that is called from the Windows command line. I am trying to do this all from within a Windows Batch file.
So far I have this:
dir C:\javascripts /a-d /b /s >FileListing.txt
This creates a file called "FileListing.txt" whos contents look like this:
C:\javascripts\index.js C:\javascripts\other_javascripts.js ... C:\javascripts\helper.js
The next thing I need to do is call an executable that uses these file names as arguments in this way:
java -jar compiler.jar --js=C:\javascripts\index.js --js=C:\javascripts\other_javascripts.js ... --js_output_file=compiled_javascripts.js
This is for use with the google javascript compiler. The objective is to take all these javascripts and minify and compile them into one file.
How do I get these file names into the command line arguments?
Thanks so much!