- @echo off
- setlocal enabledelayedexpansion
- for /d %%i in (C:\*) do (
- if exist %%i\lishi\ (
- set folderSrc=%%i
- set folderDst=!folderSrc:~-2!
- echo call :Copy_File "%%i" !folderDst!
- )
- )
- goto :eof
-
- :Copy_File
- for /f "skip=10 delims=" %%j in ('dir /b /a-d /o-n /s "%~1\lishi\*.txt"') do (
- echo copy "%%j" "C:\数据\%2\1.txt"
- goto :eof
- )
复制代码
|