Bat 自动更新脚本

@echo off
@rem echo %~dpn1%~x1
@rem echo %1
@rem echo %~n1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%~x1

set p1=\\teanerp\远程ERP\hy远程ERP\hy远程ERP\
set p2=\\teanerp\远程ERP\kx远程ERP\kx远程ERP\
set p3=\\teanerp\远程ERP\xy远程ERP\xy远程ERP\
set p4=\\teanerp\teanerp\

if "%1"=="" goto end

if exist "%p1%%~n1%~x1" ren "%p1%%~n1%~x1" "%~n1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%~x1"
if exist "%p2%%~n1%~x1" ren "%p2%%~n1%~x1" "%~n1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%~x1"
if exist "%p3%%~n1%~x1" ren "%p3%%~n1%~x1" "%~n1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%~x1"
if exist "%p4%%~n1%~x1" ren "%p4%%~n1%~x1" "%~n1_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%~x1"
copy /y "%~dpn1%~x1" "%p1%"
copy /y "%~dpn1%~x1" "%p2%"
copy /y "%~dpn1%~x1" "%p3%"
copy /y "%~dpn1%~x1" "%p4%"

goto ok

:ok
echo 更新成功 & pause
exit

:end
echo "文件不存在" &pause
exit

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值