The file system keywords are helpful in performing actions on various files.
Suppose you wish to create a .txt file within a folder, append some text on that file for further use.
Structure :
createFolder <parameter>
createFile <parameter>
appendTextToFile <parameter>
<further steps to execute>
Info |
---|
When you mention the file name in the parameter of any action keyword, please provide the file name with extension (for example, file1.txt or file1.doc) so that the specific file can be selected to work on. |
Action | Parameters | Example Usage | ||
---|---|---|---|---|
appendTextToFile
To append content (mentioned in Parameter 1) to an existing file (mentioned in Parameter 2) located in file system (mentioned in Parameter 3). | Param 1 : Text to append on the file | Example :
Appends Bqurious Automation is world's first automation on cloud in file bqFile.txt located at d:/bqLocation
| ||
compareCSVFiles
To compare two files located at (location of first file mentioned in Parameter 1) and (location of the second file mentioned in Parameter 2). Header present - (mentioned in Parameter 3). | Param 1 : Path of the first file | Example :
Compare files d:/Test/File1.csv and d:/Test/File2.csv where these files headers are not present
| ||
compareCSVFilesWithFilter
To compare two files located at (location of first file mentioned in Parameter 1) and (location of the second file mentioned in Parameter 2) with filter (filter condition mentioned in Parameter 3). If filter is not provided then only the matched columns will be compared. | Param 1 : Path of the first file | Example :
Compares files d:/Test/File1.csv and d:/Test/File2.csv with filter companyName = bqurious
| ||
createFolder
To create the folder (mentioned in Parameter 1) in the file system at location (mentioned in Parameter 2) . | Param 1 : Name of the folder to create | Example :
Creates folder bqFolder in file system at location d:/bqLocation. | ||
copyFolder
To copy the folder (mentioned in Parameter 1) from source location (mentioned in Parameter 2) to specified destination location (mentioned in Parameter 3). | Param 1 : Name of the folder to copy | Example :
Copies folder bqFolder from source location d:/bqSourceLocation to destination location d:/bqDestinationLocation.
| ||
createFile
To create the file (mentioned in Parameter 1) in the file system at location (mentioned in Parameter 2). | Param 1 : Name of the file to create | Example :
Creates file bqfile.txt in file system at location d:/bqLocation. | ||
copyFile
To copy the file (mentioned in Parameter 1) from source location (mentioned in Parameter 2) and paste it to destination location (mentioned in Parameter 3). | Param 1 : Name of the file to copy | Example :
Copies file bqfile.txt from source location d:/bqSourceLocation to destination location d:/bqDestinationLocation.
| ||
deleteFolder
To delete the folder (mentioned in Parameter 1) located at (mentioned in Parameter2) from file system. | Param 1 : Name of the folder to delete | Example :
Deleted folder bqFolder in file system at location d:/bqLocation.
| ||
deleteFile
To delete the file (mentioned in Parameter 1) from file system location (mentioned in Parameter 2). | Param 1 : Name of the file to delete | Example :
Deletes file bqfile.txt in file system at location d:/bqLocation.
| ||
moveFolder
To move the folder (mentioned in Parameter 1) from source location (mentioned in Parameter 2) to specified destination location (mentioned in Parameter 3). | Param 1 : Name of the folder to move | Example :
Moves folder bqFolder from source location d:/bqSourceLocation to destination location d:/bqDestinationLocation.
| ||
moveFile
To move the file (mentioned in Parameter 1) from source location (mentioned in Parameter 2) to specified location (mentioned in Parameter 3). | Param 1 : Name of the file to move | Example :
Moves the file bqfile.txt from source location d:/bqSourceLocation to destination location d:/bqDestinationLocation.
| ||
readFileAndStore
To read the file (mentioned in Parameter 1) from the location (mentioned in Parameter 2) and store the contents in variable (mentioned in Parameter 3). | Param 1 : Name of the file to read | Example :
Reads the file bqfile.txt from location d:/bqSourceLocation and stores contents into variable
| ||
writeToFile
To overwrite the existing file (mentioned in Parameter 2) located in file system (mentioned in Parameter 3) with new text (mentioned in Parameter 1). | Param 1 : Text to write on the file | Example :
Writes Hello, Welcome to BQurious in file bqFile.txt located at d:/bqLocation.
|