cd %1 for %%1 in (*.lzh) do lha e /m %%1 copy *.txt text del *.txt for %%1 in (*.arj) do arj e -n %%1 copy *.txt text del *.txt cd ..