经常会用到批处理处理一些小东西,奈何语法总是记不住,整理一下,以备忘
@echo off
setlocal enabledelayedexpansion
set sep=_
for %%f in (*.csv) do(
call :drip %%f %sep%
)
goto end
:drip
set drip_str=%~1
for /f "delims= tokens=1" %%V in ("%drip_str") do (
mkdir DFE-%%V-202108
xcopy /E DEF-xxxxxxx-202108 DFE-%%V-202108
copy %drip_str% DFE-%%V-202108\\0000000001\\jnt_0000000001.csv
)
:end