- @echo off
- setlocal enabledelayedexpansion
- for /l %%a in (1,1,5) do (
- set "flag=yes"
- for %%b in ("%%a\*") do (
- if not exist "A\%%~nxb" (
- set "flag=no"
- ) else (
- fc /b "%%b" "A\%%~nxb" > nul
- if errorlevel 1 (
- set "flag=no"
- )
- )
- )
- if "!flag!" equ "no" (
- echo %%a 不同
- )
- )
-
- for %%a in ("A\*") do (
- set "flag=yes"
- for /l %%b in (1,1,5) do (
- if not exist "%%b\%%~nxa" (
- set "flag=no"
- set "folder=%%b"
- )
- )
- if "!flag!" equ "no" (
- echo !folder! 不同
- )
- )
- pause
复制代码
|