项目

一般

简介

行为

copyFile

复制文件

格式:
命令名 参数1 参数1 参数3
copyFile 源文件 目标文件 是否覆盖目标
说明:
参数1 源文件
参数2 目标文件
参数3 是否覆盖目标
0:强制创建并覆盖目标文件
1:目标文件已存在不覆盖
备注 源文件不存在,则不执行


备注
特戒不支持绝对路径,转版本时,处理命令需要注意


特戒引擎脚本示例:

[@示例]
#if
#act
mov s$file ..\QuestDiary\数据文件\复制1.txt

#say
<复制1/@复制1>\ \
<复制2/@复制2>\ \
<复制3/@复制3>\ \


[@复制1]
#act
;--如目标文件存在,则不执行。
copyFile ..\QuestDiary\数据文件\复制0.txt ..\QuestDiary\数据文件\复制1.txt 1
sendMsg 6 文件复制1完毕
readTxt <$str(s$file)> s0
print s0

[@复制2]
#act
;--如目标文件存在,则强制执行。
copyFile ..\QuestDiary\数据文件\复制2.txt ..\QuestDiary\数据文件\复制1.txt 0
sendMsg 6 文件复制2完毕
readTxt <$str(s$file)> s0
print s0

[@复制3]
#act
;--如源文件不存在,则不执行。
copyFile ..\QuestDiary\数据文件\复制3.txt ..\QuestDiary\数据文件\复制1.txt 0
sendMsg 6 文件复制3完毕
readTxt <$str(s$file)> s0
print s0

tejie 更新于 大约 2 个月 之前 · 1 修订