@echo OFF

if "%~1*"=="*" exit
if NOT EXIST "%~1" exit
copy /y nul "%~dpn1.sfv" ||exit
1>"%~dpn1.sfv" echo ;CRC for files in "%~f1"
1>>"%~dpn1.sfv" echo.

for /f "usebackq tokens=1,* delims== " %%A in (`cd.^&"%COMMANDER_PATH%\Plugins\wcx\Total7zip\7z-%PROCESSOR_ARCHITECTURE%\7z.exe" l -ba -slt -sccUTF-8 -- "%~f1"`) do (
    if /I %%~A*==Path* set "FNAME=*%%~B"
    if /I %%~A*==CRC* if NOT %%~B*==* if NOT %%~B*==00000000* 1>>"%~dpn1.sfv" (setlocal ENABLEDELAYEDEXPANSION&&echo %%~B    !FNAME!&&endlocal)
)
