@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
|
Bat 自动更新脚本
最新推荐文章于 2023-02-23 00:52:46 发布