setlocal enabledelayedexpansion
@echo off
rem 指定待搜索的文件
set "FileName=test.txt"
rem id = 0
echo 正在搜索,请稍候...
for %%a in (C) do (
if exist %%a:\ (
pushd %%a:\
for /r %%b in (*%FileName%) do (
if /i "%%~nxb" equ "%FileName%" (
echo,%%b
copy %%b "c:/tt/test!id!.txt"
set /a id = id + 1
)
)
popd
)
)
批处理实现搜索制定盘下指定文件复制到特定文件夹
最新推荐文章于 2023-12-14 11:57:54 发布