To make this process even smoother, as easy as drag-and-drop, we have provided a batch file (for Windows users) which can minify multiple files in a single go. To minify, you just need to drag-and-drop any JS or CSS files into the batch file and with the help of YUI compressor, the mininfied version of the file will be created in the same folder as that of the original file.
You can even right click on a JS or CSS file and use the “Open With” option and set it to execute with the provided batch file.
How it works:
:top @if [%1] ==  goto argsmissing :again @if [%1] ==  goto end @echo %1 @set opfile=%~n1.min%~x1 @%~d1 @cd "%~d1%~p1" @echo %opfile% @echo. @java -jar "%~d0%~p0yuicompressor-2.4.7.jar" --nomunge --disable-optimizations %1 -o "%opfile%" @REM - Shift the arguments (do not alter first argument) and examine %1 again @shift /1 @goto again :argsmissing @echo Argument(s) missing @echo usage: batFile.bat file1.js file2.css ... @echo. :end @pause