• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Batch Resolve Device and Group IDs by Name
    • Batch Resolve Device IDs by Name
    • Batch Resolve Group IDs by Name
    • Batch Get Devices by Device or Group IDs
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Delete Provisioning Templates
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a Configuration
    • Get a device by name
    • Get a device app by name
    • Get a group
    • Get a group id by group name
    • Get a Provisioning Template
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get Config File Deployment Status
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Generate Device Owner Enrollment QR for Template
    • List Groups
    • List Policy and Kiosk Configurations
    • List Provisioning Templates
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Search Groups
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
    • Retry Organization App Library Distribution
    • Search Organization App Library Applications
    • Batch Set Device Tags
    • Search Batch Operation Activity Logs
    • Search File Batch Delete Results
    • Search File Batch Send Results
    • Batch Delete Files
    • Batch Send Files
    • Batch Clear App Data and Cache
    • Move Groups to a Group
    • List Organization App Library Distribution Status
    • Get Application Uninstall Result
    • Get Device Daemon Permissions
    • Create Tags
    • Uninstall Application
    • List Organization App Library Applications
    • Delete Tag
    • Batch Upload Qiniu Files
    • Search File Batch Upload Results
    • Retry Batch Qiniu File Upload
  • Adalo
  • Appstore
  • Asana
  • AWS Lambda
  • AWS-S3
  • BambooHR
  • Bitbucket
  • Brevo
  • Clockify
  • Coda
  • ConvertKit
  • DingTalk
  • Discord
  • Discourse
  • Dropbox
  • Elasticsearch
  • Elastic Security
  • FeiShu
  • Firecrawl
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Github
  • Gitlab
  • Google Ads
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Grafana
  • Hacker News
  • HaloPSA
  • Harvest
  • Help Scout
  • Hubspot
  • Intercom
  • Jenkins
  • Jira
  • Kafka
  • Lemlist
  • Linear
  • Magento
  • MailChimp
  • Mautic
  • Metabase
  • Microsoft Excel
  • Microsoft OneDrive
  • Microsoft Outlook
  • Microsoft Sharepoint
  • Microsoft Teams
  • Microsoft To Do
  • monday.com
  • MySQL
  • Nextcloud
  • Notion
  • Odoo
  • Okta
  • OpenAI
  • Ortto
  • Paddle
  • PayPal
  • Pipedrive
  • PostgreSQL
  • PostHog
  • Qdrant
  • QuickBooks
  • Redis
  • Segment
  • SendGrid
  • ServiceNow
  • Shopify
  • Slack
  • Splunk
  • Spotify
  • Strapi
  • Stripe
  • System Tools
    • Code
    • CSV
    • Crypto
    • Data Shaping
    • Date & Time
    • Delay
    • Documents
    • QRCode
    • Search&Crawl
    • Text
    • Xml
  • Teambition
  • Telegram
  • Todoist
  • Trello
  • Twilio
  • Webflow
  • Wekan
  • Wikipedia
  • WooCommerce
  • WordPress
  • X
  • YouTube
  • Zammad
  • Zendesk
  • Zoho CRM
  • Zoom
  • Zulip
Home > Tools > AirDroid Business

Batch Delete Files

Tool Name: airdroid_business_file_batch_delete

Risk Level: High-Risk

Execution Mode: Asynchronous submission with an optional confirmation gate

Category: File Management

Quick Start (Copy & Use)

Summary: Queue permanent deletion of known files or directories on selected devices, groups, or both.

Prerequisites: DeletePaths and at least one of DeviceIds or GroupIds. RequireConfirmation defaults to true; the form requires Reason before deletion can be submitted.

Success Criteria: StatusCode == 200, ErrorMessage is empty, and TaskId is non-empty. This is task acceptance, not proof that any path was deleted.

What to Do Next: Query Search File Batch Delete Results using TaskId.

Minimal Request Example:

{
  "DeletePaths": [{"file_path": "/storage/emulated/0/Download/legacy-price-list.pdf", "is_dir": false, "include_dir": true, "is_external_sd": false}],
  "DeviceIds": ["a8f3d91c72b44e5fa103c892d0b74561"],
  "GroupIds": [],
  "RequireConfirmation": true
}

Minimal Response Example:

{
  "TaskId": "6a4d712e-ec25-4f58-9a52-1b0ac97b840d",
  "Hint": "",
  "Retryable": false,
  "OriginalStatusCode": 200,
  "StatusCode": 200,
  "ErrorMessage": ""
}

Recipes (Common Recipes)

Recipe 1: Delete One Internal File

When to use: A verified file should be removed from a known device.

{
  "DeletePaths": [{"file_path": "/storage/emulated/0/Download/legacy-price-list.pdf", "is_dir": false, "include_dir": true, "is_external_sd": false}],
  "DeviceIds": ["a8f3d91c72b44e5fa103c892d0b74561"],
  "GroupIds": [],
  "RequireConfirmation": true
}

Recipe 2: Delete a Folder and Its Contents from a Group

When to use: The folder root and its contents are intended to be removed.

{
  "DeletePaths": [{"file_path": "/storage/emulated/0/Download/temp-cache", "is_dir": true, "include_dir": true, "is_external_sd": false}],
  "DeviceIds": [],
  "GroupIds": [4103],
  "RequireConfirmation": true
}

Recipe 3: Read Delete Results

When to use: The submission returned an accepted TaskId.

{
  "TaskId": "6a4d712e-ec25-4f58-9a52-1b0ac97b840d",
  "PageIndex": 1,
  "PageSize": 100
}

1. Overview

1.1 Description

Creates a batch-delete task for files or directories. It permanently removes matching paths when target devices execute the task.

1.2 When to Use

  • Permanently remove verified files from Android devices.
  • Delete a directory, optionally including its root, from device or group targets.

1.3 Execution Mode and Response

The submission is asynchronous and returns TaskId. Windows targets in direct or group-expanded selection are excluded; no Android targets causes task creation to fail. Query the delete-result tool for per-device outcomes.

1.4 Prerequisites

Condition Description
Confirmation Default form requires a non-blank Reason of at most 500 characters.
Paths At least one valid path object needs a non-blank file_path.
Targets Supply at least one direct device or group target.

1.5 Prerequisite Tools

Tool Purpose
Search Devices Obtain device IDs.
List Groups Obtain group IDs.

1.6 Similar Tools

Use Search File Batch Delete Results to inspect an existing delete task rather than submit a new one.

2. Inputs

2.1 Parameter List

Parameter Type Required Default Description
DeletePaths object-array Yes [{"file_path":"/storage/emulated/0/Download/legacy-price-list.pdf","is_dir":false,"include_dir":true,"is_external_sd":false}] Files or folders to delete.
DeviceIds string-array No "" Direct target device IDs.
GroupIds number-array No "" Target group IDs.
RequireConfirmation bool No true Opens the confirmation flow.

2.2 Parameter Details

`DeletePaths`

Each item needs file_path. is_dir=true marks a directory. For directories, include_dir=true deletes the folder and contents; false deletes contents but keeps the folder. is_external_sd=true identifies an external-storage path. The runtime ignores invalid path objects but rejects the request if none are valid.

Node default: The workflow pre-fills this exact array. Replace it with the intended paths before executing the action.

[
  {
    "file_path": "/storage/emulated/0/Download/legacy-price-list.pdf",
    "is_dir": false,
    "include_dir": true,
    "is_external_sd": false
  }
]

`DeviceIds` and `GroupIds`

At least one list must contain targets; lists can be supplied together. Duplicate normalized IDs are rejected. This operation supports Android devices only, so Windows targets are excluded server-side.

`RequireConfirmation`

true collects the form Reason and waits for confirmation. false skips the form after explicit external approval and uses Confirmation skipped by RequireConfirmation=false. as the audit reason.

2.3 Parameter Combination Logic

  • Reason is a confirmation-form value, not a Start-node parameter.
  • Confirmation rejection returns StatusCode -2; timeout returns -3; neither reaches the upstream delete request.

3. Outputs

3.1 Response Examples

The Quick Start response is an accepted task.

Path validation failure:

{
  "TaskId": "",
  "Hint": "Ensure each delete_paths entry contains a non-empty file_path string.",
  "Retryable": false,
  "OriginalStatusCode": 0,
  "StatusCode": -1,
  "ErrorMessage": "No valid path objects in DeletePaths; each item must have a non-empty file_path."
}

3.2 Field Descriptions

Field Type Description
TaskId string Accepted delete-task ID for Search File Batch Delete Results.
StatusCode number 200 submit step completed; -1 validation; -2 rejection; -3 confirmation timeout; 500 system/network error.
ErrorMessage string Empty means acceptance; non-empty means failure.
Hint / Retryable string / bool Caller-visible recovery guidance.
OriginalStatusCode number Upstream HTTP status; 0, -2, and -3 identify non-upstream outcomes.

3.3 Task Completion

TaskId proves neither file removal nor a full batch success. Inspect per-device result pages separately.

4. Examples

4.1 Keep a Directory Root

For a directory, set is_dir=true and include_dir=false to delete its contents while retaining the folder.

4.2 Confirmation Not Completed

With RequireConfirmation=true, cancellation or timeout has no upstream delete call. Do not assume a path was removed.

4.3 No Android Target Remains

If Windows filtering removes every target, the task fails rather than creating a Windows deletion task.

5. Error Handling

5.1 StatusCode Semantics

StatusCode Agent action
-1 Correct paths, targets, or form reason.
-2 / -3 Obtain approval before starting another flow; deletion was not submitted.
200 with non-empty ErrorMessage Follow Hint; no accepted task is available.
500 Verify whether a task was created before repeating this write.

5.2 Common Errors

ErrorMessage Resolution
Reason must be a non-blank string up to 500 characters. Supply the required confirmation reason.
DeletePaths must be a non-empty list of path objects. Provide path objects.
At least one of DeviceIds or GroupIds must be provided. Provide device and/or group targets.

5.3 Retry Decision

The action is not idempotent: each accepted call creates a new task. Verify task and file state before retrying an uncertain write.

6. Best Practices

6.1 Security

This is a permanent deletion. Keep confirmation enabled unless approval is already documented, verify paths, and ensure the intended scope contains Android targets.

6.2 Idempotency

Not idempotent. Repeating a successful request creates another delete task.

7. Related Tools

Tool Role
Search Devices Obtain device IDs.
List Groups Obtain group IDs.
Search File Batch Delete Results Inspect per-device deletion results by TaskId.

8. Tool Chains

8.1 Confirm, Delete, and Inspect

Search Devices or List Groups -> Batch Delete Files -> Search File Batch Delete Results

Use the returned TaskId only after the high-risk confirmation path has accepted the request.

Updated on: Aug 5, 2026
Was This Page Helpful?
Prev Search File Batch Send Results
Next Batch Send Files
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • Quick Start (Copy & Use)
  • Recipes (Common Recipes)
    • Recipe 1: Delete One Internal File
    • Recipe 2: Delete a Folder and Its Contents from a Group
    • Recipe 3: Read Delete Results
  • 1. Overview
    • 1.1 Description
    • 1.2 When to Use
    • 1.3 Execution Mode and Response
    • 1.4 Prerequisites
    • 1.5 Prerequisite Tools
    • 1.6 Similar Tools
  • 2. Inputs
    • 2.1 Parameter List
    • 2.2 Parameter Details
    • 2.3 Parameter Combination Logic
  • 3. Outputs
    • 3.1 Response Examples
    • 3.2 Field Descriptions
    • 3.3 Task Completion
  • 4. Examples
    • 4.1 Keep a Directory Root
    • 4.2 Confirmation Not Completed
    • 4.3 No Android Target Remains
  • 5. Error Handling
    • 5.1 StatusCode Semantics
    • 5.2 Common Errors
    • 5.3 Retry Decision
  • 6. Best Practices
    • 6.1 Security
    • 6.2 Idempotency
  • 7. Related Tools
  • 8. Tool Chains
    • 8.1 Confirm, Delete, and Inspect
loading...
No Results