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"