@rem Starting a line with @ means it will not be echoed, which cleans up the display. @echo off rem rem Windows NT Shell Script to process EPA Emissions Data Explode Files. rem Melissa Moore -- February 2001 rem rem Input data file: year and quarter are encoded into the file extension. rem Output file: year and quarter are encoded into the directory structure. rem rem %%I - is case sensitive; it is the iteration variable. rem ~n - means the name part of the file name, without the extension. rem "For" loops through the specified directory taking all the files that match rem the spec and doing the commands following "for." rem rem The for loop does these things: rem -- runs explode.exe over every matching file rem -- saves the output to a directory of year\qtr\filename.dat rem rem Input Parameters: rem %1 - 4 digit year rem %2 - 1 digit quarter rem %3 - 2 digit year rem rem Example: explodefiles 1998 2 98 rem @echo on for %%I in (D:\packages\co2\acidrain\kansas\%1\%2\origdata\*.%3%2) do explode %%I D:\packages\co2\acidrain\kansas\%1\%2\%%~nI.dat