I think you're looking for this:
Code:
for /r %%f in (*.bk2) do arc.exe a -i2 -r -mbpk %%~dpnf.arc %%f
The variable called "%f" (if used in a .bat file, "%" must be doubled) is assigned the paths of all files matching "*.bk2" in all subdirectories, in any depth, of the current directory. After each assignment, the command after "do" is executed. The "%~dpnf" syntax splits the path in "%f" into components, keeps the "d"rive, "p"ath and "n"ame components only, and drop the e"x"tension - because you add another extension.
Run "for /?" in the command line for the complete description of the "for" command, including everything I wrote above.
__________________
Joe Forster/STA
For more information, see the
FileForums forum rules and the
PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage:
http://sta.c64.org, E-mail:
[email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!