2019-07-15 【.bat】批处理文件注意事项

2019-07-15  本文已影响0人  持刀的要迟到了

1.没有else if
2.括号(要和if else 在一行 不然报错

set CurDir=%~dp0
set LibName=%1

if "%LibName%"=="ILRScript" (
    xcopy %LibName%.dll %CurDir%..\..\zjn_hotfix_project\Assets\StreamingAssets\ILR\ /y
) else (
if "%LibName%"=="GlobalData" (
    xcopy %LibName%.dll %CurDir%..\..\zjn_hotfix_project\Assets\GameRes\ManagedLib\ /y
) else (
    pdb2mdb %LibName%.dll
    xcopy %LibName%.dll %CurDir%..\..\zjn_hotfix_project\Assets\GameRes\ManagedLib\ /y
    xcopy %LibName%.dll.mdb %CurDir%..\..\zjn_hotfix_project\Assets\GameRes\ManagedLib\ /y
    xcopy %LibName%.xml %CurDir%..\..\zjn_hotfix_project\Assets\GameRes\ManagedLib\ /y)
)
上一篇下一篇

猜你喜欢

热点阅读