本帖最后由 yu2n 于 2012-11-4 17:57 编辑
写了一个匹配的批处理,便于将找到的.dll文件复制出来。(支持直接拖放与手动输入单个文件)- cls&@echo off&title ldd for Windows, Version 1.0
- If '%1' EQU '' (
- set /p p=Drag and drop an .exe program files here:
- ) Else (
- set p=%1
- )
- If '%2' NEQ '' Exit
- If Not Exist "%~dp0ldd.exe" Exit
- FOR /F "tokens=1,* delims=^?^?" %%i in ('echo _??%p%') do (
- set creat_folder=%%~nj
- If /i "%%~xj" NEQ ".exe" Exit
- If Not Exist "%~dp0%%~nj" mkdir "%~dp0%%~nj"
- )
- FOR /F "skip=1 tokens=1,* delims=^=^> " %%i in ('cls^&"%~dp0ldd.exe" %p%') do (
- If Exist "%%j" (
- set/a a=a+1
- echo ^-^> Copy %%j
- copy "%%j" "%~dp0%creat_folder%">nul 2>nul
- ) Else (
- echo [x]File "%%j" Not Found !
- )
- )
- echo Done! The %a% dll files successfully copied
- pause
复制代码
|