Folder Operations
The folder TBox Automation Tools->Folder Operations in the Standard subset contains the following Modules:
TBox Create Folder
The Module TBox Create Folder allows you to create a folder in a specific location.
It has the following attributes:
ModuleAttribute |
Description |
---|---|
Path |
Path of the folder you want to create. |
Overwrite |
By default, Tricentis Tosca doesn't overwrite existing folders. If you want to overwrite the existing folder, set the value True. |
![]() |
In this example, you create the folder C:\Temp.
Create a folder |
TBox Copy Folder
The Module TBox Copy Folder lets you copy all contents of a folder you specify into a specific target location. This includes all files and sub-directories of that folder.
It has the following attributes:
ModuleAttribute |
Description |
---|---|
Source Path |
Path of the folder which contains the content you want to copy to a different location. |
Target Path |
Path to the destination folder where you want to copy the contents to. Note the following:
|
Overwrite |
By default, Tricentis Tosca doesn't overwrite existing files or folders. To overwrite matching contents of the Target Path folder with the Source Path folder, set this value True. |
![]() |
The TestStep in this example performs the following actions:
Copy and paste a folder to another directory |
TBox Delete Folder
The Module TBox Delete Folder allows you to delete a directory.
It has the following attributes:
ModuleAttribute |
Description |
---|---|
Path |
Path of the folder you want to delete. |
Recursive |
By default, Tricentis Tosca only deletes empty folders. If you want to delete a folder that has content, set the value True. |
![]() |
If the system can't locate the folder, the execution result shows the following description: Folder <folder name> does not exist. The test result is positive. |
![]() |
In this example, you delete the folder C:\Temp and all its contents.
Delete a folder |
TBox Folder Existence
The Module TBox Folder Existence allows you to verify whether a folder exists in a specific directory.
It has the following attribute:
ModuleAttribute |
Description |
---|---|
Path |
Path of the folder whose existence you want to verify. |
![]() |
In this example, you check if the folder reports exists in the directory C:\Temp.
Verify the existence of a folder |