匹配身份证文件名复制至目标文件夹写一个bat
@echo off setlocal enabledelayedexpansion
set source=%cd% set destination=%cd%\destination_folder
if not exist "%destination%" ( md "%destination%" )
for %%f in ("%source%*.txt") do ( set filename=%%~nf set extension=%%~xf set id=!filename:~0,18! set destination_path="%destination%!id!!extension!" copy "%%f" "!destination_path!" )
echo "Files copied successfully." pause
exit
原文地址: https://www.cveoy.top/t/topic/f74k 著作权归作者所有。请勿转载和采集!