我需要运行的bat如下,是一个提取操作,如果通过start的方式运行,会直接在当前目录而不是在子文件夹里运行:
@echo off
@echo off&setlocal EnableDelayedExpansion
set express=1
for /f "delims=" %%i in ('dir /b *.dat') do (
if not "%%~ni"=="%~n0" (
if !express! LSS 10 (ren "%%i" "0!express!.exp.json") else ren "%%i" "!express!.exp.json"
set/a express+=1
)
)
set mot=1
for /f "delims=" %%i in ('dir /b *.txt') do (
if not "%%~ni"=="%~n0" (
if !mot! LSS 10 (ren "%%i" "idle_0!mot!.mtn") else ren "%%i" "idle_!mot!.mth"
set/a mot+=1
)
)
set image=0
for /f "delims=" %%i in ('dir /b *.png') do (
if not "%%~ni"=="%~n0" (
if !image! LSS 10 (ren "%%i" "texture_0!image!.png") else ren "%%i" "texture_!image!.png"
set/a image+=1
)
)
set expressions=expressions
for /f %%i in ('dir/b *.exp.json') do (
set a=%%~ni&&md !expressions!&move %%i !expressions!
)
set img=model.1024
for /f %%i in ('dir/b *.png') do (
set a=%%~ni&&md !img!&move %%i !img!
)
set motions=motions
for /f %%i in ('dir/b *.mtn') do (
set a=%%~ni&&md !motions!&move %%i !motions!
)
@echo off
set a=
setlocal EnableDelayedExpansion
for %%n in (*.moc) do (
ren "%%n" "model!a!.moc"
)/stevenjoezhang/live2d-widget