Thursday, November 20, 2003 6:02 AM
pdbartlett
Tip of the day: Command shell FOR
I've known about the NT command shell's FOR command for a while, but have recently found myself using it more and more. You can check out it's features in full with HELP FOR, but my most common usage is analogous to *NIX's find -exec, e.g.:
FOR /F "delims=" %f IN ('*.dll') DO @regsvr32 /u "%f"
One thing to watch out for, though, is that you need to double up the percent signs if you're using it in a batch/command file.
Happy scripting...