本帖最后由 xp3000 于 2021-5-13 20:06 编辑
- @echo off
- setlocal enabledelayedexpansion
- if not exist "C:\Windows\System32\ed2ksum.exe" (
- 没有ed2ksum,请前往下面地址或其他网站下载,放入C:\Windows\System32
- echo,http://bcn.bathome.net/s/tool/index.html?key=ed2ksum
- pause&exit /b
- )
- for /f "delims=" %%i in ('"dir /a/s/b/on *.*"') do (
- if not "%%~xi"=="%~x0" (
- for /f "tokens=1,* delims= " %%j in ('ed2ksum.exe "%%i"') do (
- echo ed2k://^|file^|%%~nxi^|%%~zi^|%%j^|/
- )
- )
- )>>ed2k.txt
- set n=0
- for /f %%i in (ed2k.txt) do if '%%i' neq '' set /a n+=1
- if exist %n%个文件ed2k.txt (move /y ed2k.txt %n%个文件ed2k.txt) else (ren ed2k.txt %n%个文件ed2k.txt)
- pause
复制代码
- @echo off
- setlocal enabledelayedexpansion
- if not exist "C:\Windows\System32\ed2ksum.exe" (
- 没有ed2ksum,请前往下面地址或其他网站下载,放入C:\Windows\System32
- echo,http://bcn.bathome.net/s/tool/index.html?key=ed2ksum
- pause&exit /b
- )
-
- set n=0
- for /f "delims=*" %%i in ('dir /b /ad /s *') do (
- setlocal
- pushd %%i
- for /f "delims=*" %%j in ('dir /a-d /b "*.*"^|findstr /i /v "txt$"') do (
- set /a n+=1&set size=%%~zj
- for /f "delims=* " %%k in ('ed2ksum.exe "%%j"') do (
- echo ed2k://^|file^|%%~nxj^|!size!^|%%k^|/
- )
- )>>ed2k.txt
- if exist !n!个文件ed2k.txt (move /y ed2k.txt !n!个文件ed2k.txt>nul) else (ren ed2k.txt !n!个文件ed2k.txt)
- endlocal
- popd
- )
- pause
复制代码 呃~~~有两个问题没注意看,补上 |