由于电脑数量多,想通过批处理方式来通过更改信息,还望各位大佬赐教,谢谢。需求如下:
1、定位set-client-env.bat位定所在位置,
2、通过批处理设定SET UPDATE_SERVER=efs.dddd.com:1008 SET EAS_SERVER=tcp://efs.ddddd.com:1009 这两行当中,把dddd变更为ccccc
3、此批处理只执行一次,执行后删除此批处理。
@REM ===============================================================================
@REM SCRIPT : set-client-env.bat
@REM AUTHOR : Rock You
@REM Date : 2005-08-24
@REM REV : 1.0
@REM PLATFORM : Windows
@REM PURPOSE : This script is used to define EfS client tools runtime variavables.
@REM
@REM Copyright(c) 2005 Kingdee Co.,Ltd.
@REM All Rights Reserved
@REM ===============================================================================
SET EAS_HOME=D:\*\efs
SET JAVA_HOME=D:\test\efs\clientjdk
SET UPDATE_SERVER=efs.dddd.com:1008
SET EAS_SERVER=tcp://efs.ddddd.com:1009
SET JVM_INITIAL_HEAPSIZE=64
SET JVM_MAX_HEAPSIZE=512
SET ONDEMAND_UPDATE=false
SET ISSTART_LOADER=false
SET ISMULTI_LOADER=false
SET ENABLE_CDN=false
SET preheatClient=false作者: lcwcyz 时间: 2022-5-3 17:16
@echo off&setlocal EnableDelayedExpansion
for /f "delims=" %%a in ('findstr /n .* set-client-env.bat') do (
set "str=%%a"
set "str=!str:dddd=ccccc!"
echo !str:~1! >>tmp.txt
)
for /f "delims=" %%b in ('type tmp.txt') do (
set "str=%%b"
if "!str!"=="" (
call echo. >>new_A.txt
) else (
echo !str:~1! >>new_A.txt
))
del tmp.txt作者: lcwcyz 时间: 2022-5-3 17:16