最后一列全为0才会复制,不要牙膏。双击按提示操作。- @echo off & cd/d "%~dp0" & setlocal EnableDelayedExpansion
- echo 把【文件夹】拖到此窗口中,会处理子目录,非相关文件先移出再运行。
- echo;&set /p var=拖入文件夹,并回车:& CLS
- for /r "%var%" %%a in (*.txt) do ( for /f "delims=" %%a in ('type "%%a"') do (
- set "space=%%a" & set "space=!space: =/!"
- for /f "delims=" %%a in ("!space!") do if "%%~nxa" neq "0" set "#=#"
- )
- if not defined # ( xcopy /y "%%a" "0_Folder\">nul&&echo 复制 %%~nxa ) else set "#="
- )
- pause & exit
复制代码
|