To do an operation on multiple files in a WinXP DOS batch:

  for %%A in (*.txt) do [command]

Just a small caveat to the reader, this works within a batch file by escaping the variable ("%A" in this case). If you're running it from the command-line, you don't escape it, and thus use

        for %a in (*.txt) do [command using %a]

instead of

        for %%a in (*.txt) do [command using %%a]

Then again, maybe I'm among the freakish few that actually use for-loops at the dos-prompt. :)

-tim





Reply via email to