Batch file 批处理脚本如何使用变量返回另一个同名变量

Batch file 批处理脚本如何使用变量返回另一个同名变量,batch-file,Batch File,嗨,我如何使用一个变量返回另一个同名变量 %%b=文件3 我想要%%b返回%file3% 比如%%b% 我需要在%file3%等中使用值。。。在文件3上执行循环作业时。拉链 set file3=Bin64\Setup.exe -Install -output screen set file8=Setup.exe -Install set file11=someanotherdir\Setup.exe -options set stuff= file.zip file1.zip file2.zip

嗨,我如何使用一个变量返回另一个同名变量

%%b=文件3

我想要%%b返回%file3% 比如%%b%

我需要在%file3%等中使用值。。。在文件3上执行循环作业时。拉链

set file3=Bin64\Setup.exe -Install -output screen
set file8=Setup.exe -Install
set file11=someanotherdir\Setup.exe -options
set stuff= file.zip file1.zip file2.zip file3.zip file4.zip file5.zip file6.zip file7.zip file8.zip file9.zip file10.zip file11.zip
set count=1
:while
For /f "tokens=%count%" %%a in ("%stuff%") do (
echo %%a
set /a "count+=1"
echo File to work: %%a
for /f "tokens=1,2 delims=. " %%b in ("%%a") do (

rem ###\/ HERE [%%%b%] ???? ###
if [%%%b%] EQU [] (

echo No option detected for: %%b
goto :while
)

rem ###\/ AND HERE %%%b% ###
echo Execute this cmd for this file: %%%b%

)
pause
goto :while
)

这对你有帮助吗

@Echo关闭
SetLocal EnableDelayedExpansion
设置“file3=Setup.exe-选项”
设置“file8=Setup.exe-其他”
设置“file11=Setup.exe-可选”
设置“stuff=file.zip文件1.zip文件2.zip文件3.zip文件4.zip文件5.zip文件6.zip文件7.zip文件8.zip文件9.zip文件10.zip文件11.zip”
对于(%stuff%)中的%%A,如果已定义,则执行%%nA回显([提取%%A]-[正在运行!%%~nA!]
超时-1

请澄清您的问题。您在问什么?