24 lines
523 B
Batchfile
24 lines
523 B
Batchfile
@echo off
|
|
|
|
rem 设置源文件和目标文件夹路径
|
|
set "source_vimrc=%~dp0vimrc"
|
|
set "source_colors=%~dp0colors"
|
|
set "target_vimfiles=%USERPROFILE%\vimfiles"
|
|
set "target_colors=%USERPROFILE%\vimfiles\colors"
|
|
|
|
rem 创建目标文件夹(如果不存在)
|
|
if not exist "%target_vimfiles%" (
|
|
mkdir "%target_vimfiles%"
|
|
)
|
|
|
|
rem 复制 vimrc 文件到目标文件夹
|
|
copy /Y "%source_vimrc%" "%target_vimfiles%"
|
|
|
|
rem 复制 colors 文件夹到目标文件夹
|
|
if exist "%source_colors%" (
|
|
xcopy /S /Y /I "%source_colors%" "%target_colors%"
|
|
)
|
|
|
|
echo "操作完成"
|
|
pause
|