@echo off
@title SmartGit License Tool
color 1f
cls
set "version=8"
set "fpath=%APPDATA%\syntevo\SmartGit\%version%"
if not exist "%fpath%" (
echo 路径不存在,请查看版本信息是否正确,版本: %version%
echo %fpath%
echo.
pause
)else (
if not exist "%fpath%\settings.xml" (
@echo 已操作成功,请重新打开Smart Git...
)else (
if not exist "%fpath%\settings-backup.xml" (
copy "%fpath%\settings.xml" "%fpath%\settings-backup.xml"
@echo 配置文件备份...
)
del "%fpath%\settings.xml"
@echo 操作成功,请重新打开Smart Git...
)
echo.
pause
)
最后保存成 smartgit.bat 文件即可。
参考:https://www.jianshu.com/p/bb1a0d789518