项目

一般

简介

DelConfigFileSection » 历史记录 » 版本 1

tejie, 2024-07-02 15:54

1 1 tejie
h4. _*%{color:green}delConfigFileSection%*_
2
3
删除配置文件中的一个节点
4
5
6
标签:命令定义|delConfigFileSection>delConfigFileSection
7
8
*格式*
9
|命令名			|参数1		|参数2		|
10
|delConfigFileSection	|文件路径	|配置节点名	|
11
12
*说明*
13
* 参数1: 读取文件路径
14
路径需要基于..\Mir200\Envir
15
%{color:lightGrey}举例
16
设定读取路径为
17
\testlist.txt
18
完整读取路径
19
..\Mir200\Envir\testlist.txt%
20
21
* 参数2: 配置节点名
22
23
24
-
25
-
26
27
h4. *%{color:deepskyblue}特戒引擎脚本示例:%*
28
29
%{color:firebrick}预制配置文件1%
30
..Mir200\Envir\QuestDiary\数据文件\文件读取测试.txt.ConfigFileItem
31
文件1内容
32
[key1]
33
属性0=带后缀ConfigFileItem的配置文件
34
属性1=key1_属性1值
35
属性2=key1_属性2值
36
属性3=key1_属性3值
37
[key2]
38
属性1=key2_属性1值
39
40
%{color:firebrick}预制配置文件2%
41
..Mir200\Envir\QuestDiary\数据文件\文件读取测试.txt
42
文件1内容
43
[key1]
44
属性0=不带后续的配置文件
45
属性1=key1_属性1值
46
属性2=key1_属性2值
47
属性3=key1_属性3值
48
[key2]
49
属性1=key2_属性1值
50
51
52
bq. [@main]
53
#act
54
%{color:lightGrey};读取指定文件的配置项%
55
[[mov]] s$file1 \QuestDiary\数据文件\文件读取测试.txt.ConfigFileItem
56
[[readTxt]] <$str(s$file1)> s0
57
[[print]] 带后缀文件 s0
58
<notextile></notextile>
59
%{color:lightGrey};读取指定文件的配置项%
60
[[mov]] s$file2 \QuestDiary\数据文件\文件读取测试.txt
61
[[readTxt]] <$str(s$file2)> s0
62
[[print]] 无后缀文件 s0
63
<notextile></notextile>
64
[[mov]] s$path \QuestDiary\数据文件\文件读取测试.txt
65
*{color:green}delConfigFileSection* <$str(s$path)> key2
66
<notextile></notextile>
67
[[readTxt]] <$str(s$file1)> s0
68
[[print]] 带后缀文件 s0
69
<notextile></notextile>
70
[[readTxt]] <$str(s$file2)> s0
71
[[print]] 无后缀文件 s0