I'm trying to create a batch file that will run Doug Cockford's JSMin against all the .js files in a directory. Here's what i've got:
for /f %%a IN ('dir /b /s *.js') do jsmin <%%a >%%~da%%~pamin\%%~na.min%%~xa
The problem is that the angle brackets (<>) cause the batch file to interpret it as 0< and 1>. Event running just:
jsmin <scripts\script.js >jsmin-stuff.js
in a batch file does the same thing. Escaping the angle brackets with ^ makes jsmin think that the angle brackets are part of the path.
Any ideas? What am I doing wrong?