Skip to main content

Delete File

AutomatR.GoogleDrive.Activities.DeleteFile

The "Delete File" activity in AutomatR is part of the Google Drive activities package, enabling automation processes to delete a specific file from a specified folder within a Google Drive user's account. This activity provides a streamlined way to manage and delete files in Google Drive.

Properties

NameDescription
Input
File PathSpecifies the full file path, including the file name and its location within Google Drive, of the file to be deleted. String variables containing the file path. Example: "Root\\deletefilefrom\\1.xlsx".
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
Entry DelaySpecifies the amount of time (in seconds) to wait before executing the "Delete File" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs a boolean value indicating whether the file deletion operation was successful (true) or encountered errors (false). Variables of relevant types (e.g., Boolean variables) can store the operation result.

How to use:

  1. Drag and drop the "Delete File" activity onto the workflow.
  2. Configure the properties by specifying the file path within Google Drive.
  3. Optionally, configure the entry delay.
  4. Execute the workflow to delete the specified file from Google Drive.

Example:

Consider an example where the "Delete File" activity is used to delete a file named "1.xlsx" from a folder named "deletefilefrom" within Google Drive:

Delete File:
Entry Delay: 5
File Path: "Root\\deletefilefrom\\1.xlsx"
Result: isDeleteSuccessful

In this example, the activity waits for 5 seconds (specified by the entry delay) before executing the operation to delete the "1.xlsx" file from the "deletefilefrom" folder within Google Drive. The result of the operation (success or failure) is stored in the Boolean variable "isDeleteSuccessful" for further handling in the workflow.