<p><a href="http://developer.yahoo.com/yui/compressor/" rel="nofollow noreferrer">YUI Compressor</a> does not accept wildcard parameters, so I cannot run it like this:  </p>

<pre><code>C:&gt;java -jar yuicompressor.jar *.js
</code></pre>

<p>But I have over 500 files and would rather not have to create a batch file like this:</p>

<pre><code>C:&gt;java -jar yuicompressor.jar file1.js -o deploy\file1.js
C:&gt;java -jar yuicompressor.jar file2.js -o deploy\file2.js
...
C:&gt;java -jar yuicompressor.jar file500.js -o deploy\file500.js
</code></pre>

<p>And of course my file names are <em>not</em> in such uniform way.</p>

<p>Is there way to automate this without writing any code? :)</p>

I might go for a makefile (I think it would probably be more maintainable long term), but if you want a quick-n-dirty Windows batch command something like the following should work:
```
```
for %%a in (*.js) do @java -jar yuicompressor.jar "%%a" -o "deploy\%%a"
```
```