31 lines
1.1 KiB
Batchfile
31 lines
1.1 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
rem 设置要查找的关键字列表
|
|
set "keywords=Atypical Caustic Cloud Crack Decal Dirt Electric Environ Explosion Fire Flare FLowmap Glow Grid Hit Ice KnifeTrail LightBeam Line Mask Noise Other Rain Ring Shine Shockwave Smoke Spatter Spell Symbol Trail Water"
|
|
|
|
rem 设置目标文件夹路径
|
|
set "target_folder=D:\All WX\All UE\Project\c_101\pic"
|
|
|
|
rem 遍历目标文件夹中的所有文件
|
|
for %%f in ("%target_folder%\*.*") do (
|
|
rem 遍历每个关键字
|
|
for %%k in (%keywords%) do (
|
|
rem 检查文件名中是否包含关键字(不区分大小写)
|
|
echo %%~nxf | findstr /i "%%k" >nul
|
|
if %errorlevel% equ 0 (
|
|
rem 检查是否存在以关键字命名的文件夹,如果不存在则创建
|
|
if not exist "%target_folder%\%%k" mkdir "%target_folder%\%%k"
|
|
rem 移动文件到关键字文件夹
|
|
move "%%f" "%target_folder%\%%k"
|
|
rem 一旦找到匹配的关键字,跳出内层循环
|
|
rem goto A
|
|
)
|
|
rem :A
|
|
)
|
|
|
|
)
|
|
|
|
echo 完成!
|
|
pause
|