回复 1# wbkl
- @echo off&(setlocal enabledelayedexpansion)>nul 2>nul
- set "#name#=5123"
- for /l %%i in (0,1,8192)do if /i not "!#name#:~%%i,1!"=="" set/a "n+=1"
- for /f "delims=" %%i in ('dir/ad/s/b/l/on "%~dp0"')do (
- set "#name_i#=%%~nxi"
- if /i "!#name_i#:~0,%n%!"=="%#name#%" (
- echo,相同:%%i
- )else (
- echo,不同:%%i
- )
- )
- pause
复制代码
|