本帖最后由 qixiaobin0715 于 2022-11-2 08:41 编辑
bat文件保存为ANSI编码:- @echo off
- setlocal enabledelayedexpansion
- set outputDir=C:\Users\peng\Desktop\bat\copy\
- for /f "delims=" %%a in (test.txt) do set _"%%a"=true
- for /f "delims=" %%i in ('dir /s /b /a-d') do if defined _"%%~nxi" copy "%%i" "%outputDir%"
复制代码
|