lvwenjun11 当前离线
列兵
评分人数
aloha20200628 当前离线
上尉
@echo off &for /f "tokens=1 delims=-" %%a in ('dir /b/a-d *-*.ts') do if not exist "【视频监控%%a】" ( md "【视频监控%%a】" move /y "%%a-*.ts" "【视频监控%%a】\" ) 2>nul pause&exit/b复制代码
TOP
77七 当前离线
中校
@echo off cd /d "%~dp0" (for %%d in (.) do ( for /f "delims=" %%i in ('dir /b /a-d *.ts ^| findstr /rixc:"[0-9][0-9]*-[0-9][0-9]*\.ts"') do ( for /f "delims=-" %%a in ("%%~ni") do ( md "%%~nxd%%a" move "%%i" "%%~nxd%%a\" ) ) )) 2 > nul pause复制代码
77七 发表于 2024-9-12 12:00
qixiaobin0715 当前在线
大校
@echo off for %%i in ("%cd%") do set Folder=%%~nxi for /f "tokens=1* delims=-" %%i in ('dir /b /a-d *-*.ts') do ( md "%Folder%%%i" 2>nul move "%%i-%%j" "%Folder%%%i\" ) pause复制代码