Skip to main content

Delete

Delete a file if it exists, every file the name rules choose, or every file in a folder that matches a pattern and optional size and age limits.

Command in the File toolkit · id ooa.file/delete · 9 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PathFileYesFile path (or name rules choosing several files), or a folder when pattern is given.
PatternStringNoDelete the files in the folder at path that match this glob pattern.
Include subfoldersBooleanNofalseWith pattern, also delete matching files in sub-folders.
Older than (days)NumberNoWith pattern, only files last changed more than this many days ago.
Minimum size (bytes)NumberNoWith pattern, only files at least this large.
Maximum size (bytes)NumberNoWith pattern, only files at most this large.
Modified afterDateTimeNoWith pattern, only files last changed after this date and time (UTC, like every DateTime; Text to date converts local times).
Modified beforeDateTimeNoWith pattern, only files last changed before this date and time (UTC, like every DateTime; Text to date converts local times).
Several files at onceBooleanNofalseDelete up to four files at the same time; faster for many files on a network share.

Outputs​

OutputTypeWhat it is
deletedNumberNumber of files deleted.
filesListPaths of the files deleted.