@echo off
set xpath=_bg.jpg
set xpath2=_bg.png
set dir=%cd%
echo %xpath2%
for /D %%s in (*) do (
cd %%s
md temp_temp
for /D %%m in (*) do (
if %%m neq texture_TIME (
if %%m neq texture_BIGB (
if %%m neq temp_temp (
echo %dir%\%%s\%%m\%%m%xpath%
if exist %dir%\%%s\%%m\%%m%xpath% (
cd temp_temp
md %%m
cd ..
copy %dir%\%%s\%%m\%%m%xpath% %dir%\%%s\temp_temp\%%m\%%m%xpath%
del %dir%\%%s\%%m\%%m%xpath%
)
echo %dir%\%%s\%%m\%%m%xpath2%
if exist %dir%\%%s\%%m\%%m%xpath2% (
cd temp_temp
md %%m
cd ..
copy %dir%\%%s\%%m\%%m%xpath2% %dir%\%%s\temp_temp\%%m\%%m%xpath2%
del %dir%\%%s\%%m\%%m%xpath2%
)
)
)
)
)
cd ..
)
for /D %%s in (*) do (
cd %%s
md texture_TIME
md texture_BIGB
for /D %%m in (*) do (
if %%m neq texture_TIME (
if %%m neq texture_BIGB (
if %%m neq temp_temp (
TexturePacker --data texture_TIME/%%m.plist --format cocos2d --sheet texture_TIME/%%m.pvr.ccz --opt RGBA4444 --dither-fs-alpha --premultiply-alpha --enable-rotation --allow-free-size %%m
TexturePacker --data texture_BIGB/%%m.plist --format cocos2d --sheet texture_BIGB/%%m.png --opt RGBA4444 --dither-fs-alpha --premultiply-alpha --enable-rotation --allow-free-size %%m
)
)
)
)
cd ..
)
for /D %%s in (*) do (
cd %%s
for /D %%m in (*) do (
if %%m equ temp_temp (
cd %%m
for /D %%t in (*) do (
echo hello
echo %dir%\%%s\%%m\%%t\%%t%xpath%
if exist %dir%\%%s\%%m\%%t\%%t%xpath% (
copy %dir%\%%s\%%m\%%t\%%t%xpath% %dir%\%%s\%%t\%%t%xpath%
)
if exist %dir%\%%s\%%m\%%t\%%t%xpath2% (
copy %dir%\%%s\%%m\%%t\%%t%xpath2% %dir%\%%s\%%t\%%t%xpath2%
)
)
cd ..
)
)
cd ..
)
for /D %%s in (*) do (
cd %%s
for /D %%m in (*) do (
if %%m equ temp_temp (
rmdir /s/q %%m
)
)
cd ..
)
pause
主要部分:
lidong1 10:44
@echo off
for /D %%s in (*) do (
echo %%s
cd %%s
md texture_TIME
md texture_BIGB
for /D %%m in (*) do (
if %%m neq texture_TIME (
if %%m neq texture_BIGB (
TexturePacker --data texture_TIME/%%m.plist --format cocos2d --sheet texture_TIME/%%m.pvr.ccz --opt RGBA4444 --dither-fs-alpha --premultiply-alpha --enable-rotation --allow-free-size %%m
TexturePacker --data texture_BIGB/%%m.plist --format cocos2d --sheet texture_BIGB/%%m.png --opt RGBA4444 --dither-fs-alpha --premultiply-alpha --enable-rotation --allow-free-size %%m
lidong1 10:44
)
)
)
cd ..
)
pause