写两个不一样的,放一级文件夹- @echo off&cd /d "%~dp0"
- set /a dep=2
- setlocal enabledelayedexpansion
- for /r %%i in (*) do (
- set "f=%%i"
- for /f %%a in ('cmd /u/q/c set /p"=!f:%~dp0=!"^<nul^|find /v ""^|find /c "\"') do (
- if %%a equ %dep% move /y "%%i" "%~dp0"&&echo,%%i
- )
- )
- pause
复制代码
- @echo off&cd /d "%~dp0"
- setlocal enabledelayedexpansion
- for /r %%i in (*) do (
- set "f=%%i"&set "f=!f:%~dp0=!"
- for /f "tokens=3-4 delims=\" %%a in ("!f!") do (
- if "%%b"=="" move /y "%%i" "%~dp0"&&echo,%%i
- )
- )
- pause
复制代码
|