@ECHO OFF
SETLOCAL EnableExtensions EnableDelayedExpansion
set "wtlist1[0]=%ProgramFiles%"
set "wtlist1[1]=%ProgramFiles(x86)%"
set "wtlist2[0]=Acer Games"
set "wtlist2[1]=ASUS Games"
set "wtlist2[2]=Dell Games"
set "wtlist2[3]=Gateway Games"
set "wtlist2[4]=HP Games"
set "wtlist2[5]=Lenovo Games"
set "wtlist2[6]=TOSHIBA Games"
set "wtlist2[7]=WildTangent"
set "wtlist2[8]=WildTangent Games"
set "wtlist2[9]=WildGames"
set "wtlist3[0]=Uninstall.exe"
set "wtlist3[1]=Uninstaller.exe"
for /L %%a in (0,1,9) do (
for /L %%b in (0,1,1) do (
for /L %%c in (0,1,1) do (
echo "!wtlist1[%%b]!\!wtlist2[%%a]!\!wtlist3[%%c]!"
)
)
)
Outra abordagem:
@ECHO OFF
SETLOCAL EnableExtensions DisableDelayedExpansion
for %%a in (
"Acer Games"
"ASUS Games"
"Dell Games"
"Gateway Games"
"HP Games"
"Lenovo Games"
"TOSHIBA Games"
"WildTangent"
"WildTangent Games"
"WildGames"
) do (
for %%b in (
"%ProgramFiles%"
"%ProgramFiles(x86)%"
) do (
for %%c in (
"Uninstall.exe"
"Uninstaller.exe"
) do (
echo "%%~b\%%~a\%%~c"
)
)
)
Recursos (leitura obrigatória):
- (referência de comando) Um índice A-Z da linha de comando do Windows CMD
- (particularidades úteis) Sintaxe de linha de comando do shell do Windows CMD
- (
%~a
etc. página especial) Argumentos da linha de comando (parâmetros) - (página especial) EnableDelayedExpansion