commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Usually the MS-DOS cmd.exe processes in the whole FOR loop as one command and expands each var like %varname% in before (except the loop var of course).
This command enables expansion of other vars than only the loop var during the FOR loop. The syntax of the var to expand is then !varname! inside the FOR loop.
to end the setlocal command.
E.g. (only works from batch files, not from commandline directly):
FOR %%A IN (*) DO (
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.