本帖最后由 yg8547 于 2023-10-11 23:02 编辑
假设有一个文件在C盘根目录下文件名为复制代码 ,文件部分内容如下;需将里面内容复制代码 替换为复制代码 ,如何用批处理来替换呢?- [Text Setting]
- TextPath=D:\Conductor90\S_Data\Report
-
- [HTML Setting]
- HTMLPath=D:\Conductor90\S_Data\Report\Html
- ;没有IIS
- URLPath=file://D:\Conductor90\S_Data\Report\Html
- ;有IIS
- ;URLPath= http://127.0.0.1/Html
-
- [Batch Setting]
- BatchPath=D:\Conductor90\S_Data\Batch_Log
- ;未装 IIS
- URLPath=file://D:\Conductor90\S_Data\Batch_Log
- ;己装 IIS
- ;URLPath= http://127.0.0.1/Batch_Log
- C:\Conductor666\
- [Trans Setting]
- TransPath=D:\Conductor90\S_Data\Trans_Log
- ;未装 IIS
- URLPath=file://D:\Conductor90\S_Data\Trans_Log
- ;己装 IIS
- ;URLPath= http://127.0.0.1/Trans_Log
复制代码 最终结果如下所示- [Text Setting]
- TextPath=C:\Conductor666\S_Data\Report
-
- [HTML Setting]
- HTMLPath=C:\Conductor666\S_Data\Report\Html
- ;没有IIS
- URLPath=file://C:\Conductor666\S_Data\Report\Html
- ;有IIS
- ;URLPath= http://127.0.0.1/Html
-
- [Batch Setting]
- BatchPath=C:\Conductor666\S_Data\Batch_Log
- ;未装 IIS
- URLPath=file://C:\Conductor666\S_Data\Batch_Log
- ;己装 IIS
- ;URLPath= http://127.0.0.1/Batch_Log
- C:\Conductor666\
- [Trans Setting]
- TransPath=C:\Conductor666\S_Data\Trans_Log
- ;未装 IIS
- URLPath=file://C:\Conductor666\S_Data\Trans_Log
- ;己装 IIS
- ;URLPath= http://127.0.0.1/Trans_Log
复制代码
|