Skip to main content


Command Description

Specify a file path and write the content to the corresponding file. All the original content in the file will be overwritten

Command Prototype


Parameter Description

sPathTruepath'''C:\Users'''The path of the file that needs to be written. You can fill in the absolute path or use the @res "path" form to indicate the path under the res folder of the current process. The path separator must be escaped, such as "C:\Laiye RPA" or @res"Laiye RPA \Laiye RPA"
sTextTruestring""The file content to write
sCharsetTrueenum"gbk"The file encode is automatically determined when it is passed as "auto", ANSI code when it is passed as "ANSI", UTF-8 code when it is passed as "utf8", and utf-16 code when it is passed as "Unicode"


/************************************Write to file************ **************************** 
Command prototype:
Input parameters:
sPath--the file path to read
sText--file content written
sCharset--file character set encoding (optional)
Outgoing parameters:
Dim sPath='''C:\Users\Chance\Desktop\testFile\data.txt'''
Dim sText="RPA"