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 allows you to copy a folder to a specific location.

It has the following attributes:

ModuleAttribute

Description

Source Path

Path of the folder you want to copy.

Target Path

Path of the folder you want to copy the source into.

Overwrite

By default, Tricentis Tosca doesn't overwrite existing folders. If you want to overwrite the existing folder, set the value True.

The TestStep in this example performs the following actions:

  • Copies the C:\Source\ directory into C:\Target\ as a sub-directory.

  • Overwrites the existing files and folders in the target directory.

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