我在让“MOVE”在我的脚本中工作时遇到问题......我正在为一个旧安装程序制作一个答案文件,但我无法让移动实际工作,它一直说找不到路径, 有任何想法吗?我已经为此奋斗了一段时间,我想我正处于我只需要其他人来看看它的地步。
@echo off
set /p exeLoc=Drop .EXE here:
REM removing quotes
set exeLoc=%exeLoc:"=%
REM stripping filename from path
for %%i in (%exeLoc%) do set exeLoc=%%~dpi
REM setting exeLoc
set exePath=%exeLoc%
set /p fileName=Name of .ISS file to save:
REM identifies if the filename contains the proper suffix (.iss)
if x%fileName:.iss=%==x%fileName% set fileName=%fileName%.iss
cls
echo.%exePath%
echo.%fileName%
echo.
echo.Please wait, this may take some time...
verify >nul
REM creates record of install
%exeLoc% -r
echo.
set moveDir=%exePath%\%fileName%
set fromDir=C:\Windows\setup.iss
verify >nul
move /Y %fromDir% %fileName%
echo.
IF '%ERRORLEVEL%'=='0' echo.Answer file moved to& echo.%moveDir%
IF NOT '%ERRORLEVEL%'=='0' echo.There as an issue moving& echo.%fromDir%& echo.to& echo.%moveDir%
pause