bug in del_old_driverpacks.bat
› Forums › Snappy Driver Installer Origin › bug in del_old_driverpacks.bat
Tagged: SDIO
- This topic has 2 replies, 2 voices, and was last updated 3 weeks, 4 days ago by
Ben Dubin.
Viewing 2 reply threads
-
AuthorPosts
-
-
27 April, 2022 at 4:07 pm #5200
Ben Dubin
ParticipantThe driverpack cleanup batch file wrongfully attempts to delete DP_Sounds_Realtek_22035.7z, even though this driverpack is up to date (included in the latest driverpack torrent.)
I’m no expert, but it looks like it’s confusing DP_Sounds_Realtek_DCH_22043.7z as a newer version when the DCH and non-DCH should be seen as separate and unrelated packs.
-
27 April, 2022 at 9:25 pm #5201
webmaster
KeymasterYou are totally correct and thanks for bringing that to my attention. The DCH file is new this release and I missed it. I’ve updated the batch file to better support the new variation.
Here’s the new version (watch out for extraneous code tags, they are the backticks):
MS DOS12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455@echo offecho Snappy Driver Installer Originecho Driver Pack Cleanupecho by Computer Blokeecho.@setlocal enableextensions@cd /d "%~dp0/drivers"attrib *.* -Rrem out of date driver packsfor /f "tokens=1,2,3,4,5,6,7 delims=_. usebackq" %%i in (<code>dir /b *.7z</code>) do call :cleanup %%i %%j %%k %%l %%m %%n %%orem redundant driver packsdel DP_Sound_ADI_*.7z 2> nulcd ..goto :end:cleanupif /i "%7"=="7z" call :clean7 %1 %2 %3 %4 %5 %6 && goto :eofif /i "%6"=="7z" call :clean6 %1 %2 %3 %4 %5 && goto :eofif /i "%5"=="7z" call :clean5 %1 %2 %3 %4 && goto :eofif /i "%4"=="7z" call :clean4 %1 %2 %3 && goto :eofif /i "%3"=="7z" call :clean3 %1 %2 && goto :eofgoto :eof:clean7for /f "tokens=* usebackq" %%f in (<code>dir /b /on "%1_%2_%3_%4_%5_?????.7z"</code>) do set "GOODFILE=%%f"echo Keeping most recent driver file: %GOODFILE%for %%f in (%1_%2_%3_%4_%5_?????.7z) do if not "%%f"=="%GOODFILE%" echo "%%f" & del "%%f"goto :eof:clean6for /f "tokens=* usebackq" %%f in (<code>dir /b /on "%1_%2_%3_%4_?????.7z"</code>) do set "GOODFILE=%%f"echo Keeping most recent driver file: %GOODFILE%for %%f in (%1_%2_%3_%4_?????.7z) do if not "%%f"=="%GOODFILE%" echo "%%f" & del "%%f"goto :eof:clean5for /f "tokens=* usebackq" %%f in (<code>dir /b /on "%1_%2_%3_?????.7z"</code>) do set "GOODFILE=%%f"echo Keeping most recent driver file: %GOODFILE%for %%f in (%1_%2_%3_?????.7z) do if not "%%f"=="%GOODFILE%" echo "%%f" & del "%%f"goto :eof:clean4for /f "tokens=* usebackq" %%f in (<code>dir /b /on "%1_%2_?????.7z"</code>) do set "GOODFILE=%%f"echo Keeping most recent driver file: %GOODFILE%for %%f in (%1_%2_?????.7z) do if not "%%f"=="%GOODFILE%" echo "%%f" & del "%%f"goto :eof:clean3for /f "tokens=* usebackq" %%f in (<code>dir /b /on "%1_?????.7z"</code>) do set "GOODFILE=%%f"echo Keeping most recent driver file: %GOODFILE%for %%f in (%1_?????.7z) do if not "%%f"=="%GOODFILE%" echo "%%f" & del "%%f"goto :eof:end-
This reply was modified 3 weeks, 6 days ago by
.
-
This reply was modified 3 weeks, 6 days ago by
.
-
This reply was modified 3 weeks, 6 days ago by
.
-
This reply was modified 3 weeks, 6 days ago by
-
30 April, 2022 at 1:05 pm #5208
Ben Dubin
ParticipantThank You!
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.