使用 7z 提取压缩文件时出现批处理文件错误

问题描述 投票:0回答:0

我的批处理文件不会解压,并说找不到“美元”。

我觉得它一直卡在解压上,所以如果有人能帮忙那就太好了。

mkdir "%USERPROFILE%\JGittech\Logs\Misc\"

@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(

Set DayW=%%A
Set Day=%%B
Set Month=%%C
Set Year=%%D
Set All=%%D%%B%%C
)


@echo on
set LOGFILE=%USERPROFILE%\JGittech\Logs\Misc-logs\first-time-setup-log-%All%.txt
call :LOG > %LOGFILE%
exit /B

:LOG


@echo on

mkdir "%USERPROFILE%\JGittech\Logs\Backup\"
mkdir "%USERPROFILE%\JGittech\Logs\Tune-Up\"
mkdir "%USERPROFILE%\JGittech\Logs\Antimalware\"
mkdir "%USERPROFILE%\JGittech\Documents\Agreements\"



cd %USERPROFILE%\Downloads




del 7z2201-x64.exe
del Install_WD_Discovery_for_Windows.zip
del reflect_setup_free_x64.exe
del TeamViewer_Setup_x64.exe
del subscription.pdf


curl "https://jgittech.com/pages/legal/subscription.pdf" --output subscription.pdf


START https://downloads.wdc.com/wdapp/Install_WD_Discovery_for_Windows.zip
rem if installer hangs at 18% go to task manager and kill the 32bit tasks for the installer
rem the installer will fail. when this happens run it again and it should work
START  https://download.macrium.com/reflect/v8/v8.0.7279/reflect_setup_free_x64.exe

rem manually install macrium then install wd discovery so macrium knows where to back up to!!
rem manuaaly sighn in with accound on wd discovery to access cloud

START  https://download.teamviewer.com/download/TeamViewer_Setup_x64.exe

START https://7-zip.org/a/7z2201-x64.exe

TIMEOUT /T 30

copy "%~dp0\read me.txt" "%USERPROFILE%\JGittech\Documents\"
copy "%USERPROFILE%\Downloads\subscription.pdf" "%USERPROFILE%\JGittech\Documents\Agreements\"

start 7z2201-x64.exe

TIMEOUT /T 30

cd %USERPROFILE%\Downloads

for /R "%USERPROFILE%\Downloads" %%I in ("%USERPROFILE%\Downloads\Install_WD_Discovery_for_Windows.zip") do (
  "%ProgramFiles%\7-Zip\7z.exe" x -y -aos -o"%%~dpI" "%%~fI"
  "if errorlevel 1 goto :error"
    del "%%~fI"
  ":error"
)

cd %USERPROFILE%\Downloads


start /wait reflect_setup_free_x64.exe
start /wait TeamViewer_Setup_x64.exe



cd "%USERPROFILE%\JGittech\Documents\Agreements"
"subscription.pdf"

cd %USERPROFILE%\JGittech\Documents"
"read me.txt"


cd %USERPROFILE%\Downloads

start "Install WD Discovery for Windows (2).exe"
windows batch-file unzip 7zip
© www.soinside.com 2019 - 2024. All rights reserved.