本帖最后由 ednykissyou 于 2022-2-9 15:16 编辑
回复 5# qixiaobin0715
我把另一贴中的自动FD2改为自动判断版本(BB)变化的路径。提示命令语法不正确了- @echo off
- for /d %%i in ("C:\Program Files (x86)\Rime\weasel*") do set "BB=%%~i"
- set FD1=C:\Program Files (x86)\Rime\%BB%\data\opencc\
- set FD2=D:\Program Files (x86)\S-srf\Rime\filters\
- cd /d "%FD2%"
- for /f "delims=" %%i in ('dir /b /ad') do copy /y "%%i\*.*" "%FD1%"
- pause
复制代码 ----------------晕炸了--------------------我好像晓得了
这里应该是:- set FD1=%BB%\data\opencc\
复制代码 还有我想把批处理直接放在FD1的Rime下,直接用相对路径要咋整呢
下边这样就对了:- @REM 先复制滤镜到opencc下
-
- @echo off
- for /d %%i in ("C:\Program Files (x86)\Rime\weasel*") do set "BB=%%~i"
- set FD1=%BB%\data\opencc\
- @REM 相对路径 要求本批处理直接放在Rime下
- set FD2=%cd%\filters\
- @REM 绝地路径
- @REM set FD2=D:\Program Files (x86)\S-srf\Rime\filters\
- cd /d "%FD2%"
- for /f "delims=" %%i in ('dir /b /ad') do copy /y "%%i\*.*" "%FD1%"
- pause
-
- @rem 重新部署
- @echo off
- for /d %%i in ("C:\Program Files (x86)\Rime\weasel*") do set "FD=%%~i"
- start "" "%FD%\WeaselDeployer.exe"
复制代码
|