CopyFile » 历史记录 » 版本 1
tejie, 2024-07-24 18:17
| 1 | 1 | tejie | h4. *_{color:green}copyFile_* |
|---|---|---|---|
| 2 | |||
| 3 | 复制文件 |
||
| 4 | |||
| 5 | *格式:* |
||
| 6 | |命令名|参数1|参数1|参数3| |
||
| 7 | |copyFile|源文件|目标文件|是否覆盖目标| |
||
| 8 | |||
| 9 | *说明:* |
||
| 10 | |参数1|源文件| |
||
| 11 | |参数2|目标文件| |
||
| 12 | |^.参数3|是否覆盖目标 |
||
| 13 | 0:强制创建并覆盖目标文件 |
||
| 14 | 1:目标文件已存在不覆盖 | |
||
| 15 | |^.备注|源文件不存在,则不执行| |
||
| 16 | |||
| 17 | |||
| 18 | *{color:red} |
||
| 19 | 备注 |
||
| 20 | 特戒不支持绝对路径,转版本时,处理命令需要注意* |
||
| 21 | |||
| 22 | - |
||
| 23 | - |
||
| 24 | |||
| 25 | h4. *{color:deepskyblue}特戒引擎脚本示例:* |
||
| 26 | |||
| 27 | bq. [@示例] |
||
| 28 | #if |
||
| 29 | #act |
||
| 30 | [[mov]] s$file ..\QuestDiary\数据文件\复制1.txt |
||
| 31 | <notextile></notextile> |
||
| 32 | #say |
||
| 33 | <notextile><复制1/@复制1>\ \</notextile> |
||
| 34 | <notextile><复制2/@复制2>\ \</notextile> |
||
| 35 | <notextile><复制3/@复制3>\ \</notextile> |
||
| 36 | <notextile></notextile> |
||
| 37 | <notextile></notextile> |
||
| 38 | <notextile>[@复制1]</notextile> |
||
| 39 | #act |
||
| 40 | %{color:lightGrey};--如目标文件存在,则不执行。% |
||
| 41 | *{color:green}copyFile* ..\QuestDiary\数据文件\复制0.txt ..\QuestDiary\数据文件\复制1.txt 1 |
||
| 42 | [[sendMsg]] 6 文件复制1完毕 |
||
| 43 | [[readTxt]] <$str(s$file)> s0 |
||
| 44 | [[print]] s0 |
||
| 45 | <notextile></notextile> |
||
| 46 | <notextile>[@复制2]</notextile> |
||
| 47 | #act |
||
| 48 | %{color:lightGrey};--如目标文件存在,则强制执行。% |
||
| 49 | *{color:green}copyFile* ..\QuestDiary\数据文件\复制2.txt ..\QuestDiary\数据文件\复制1.txt 0 |
||
| 50 | [[sendMsg]] 6 文件复制2完毕 |
||
| 51 | [[readTxt]] <$str(s$file)> s0 |
||
| 52 | [[print]] s0 |
||
| 53 | <notextile></notextile> |
||
| 54 | <notextile>[@复制3]</notextile> |
||
| 55 | #act |
||
| 56 | %{color:lightGrey};--如源文件不存在,则不执行。% |
||
| 57 | *{color:green}copyFile* ..\QuestDiary\数据文件\复制3.txt ..\QuestDiary\数据文件\复制1.txt 0 |
||
| 58 | [[sendMsg]] 6 文件复制3完毕 |
||
| 59 | [[readTxt]] <$str(s$file)> s0 |
||
| 60 | [[print]] s0 |