Skip to content
Actions for Obsidian icon Home Actions for Obsidian 2024.2.3 › Actions

Actions for Obsidian › Actions › List All Files

Returns a list of all files (notes, media files, etc.) in a vault, as file paths, sorted alphabetically.

Parameters

Vault

The vault to work in.

Type: Vault reference

Filter by path

Enables filtering the list of paths reported by Obsidian.

"It contains …" returns only the paths that contain Filter string.

"It begins with …" returns only the paths that begin with the given Filter string.

"It ends with …" returns only the paths ending in the value of Filter string.

Default: No filtering.

Options:

  • No
  • It contains …
  • It begins with …
  • It ends with …

Filter string

Filter the results by this string as specified by Filter. Only available when filtering is enabled.

Type: Text

Case-insensitive filtering

Enable if lowercase and uppercase shouldn't make a difference. Only available when filtering is enabled.

Type: Boolean (YES/NO)

Return Value

Text (list)

Examples

Most of the time you would use this action to get a list of all your file paths, then loop over the results list using the built-in "Repeat With" block and filter them with whatever you need. The loop variable Repeat Item  will contain a single file path.

Screenshot of the described workflow

If you want to filter the list, I recommend using the "Filter List" action from Sindre Sorhus's excellent Actions app (no relation) or a built-in "Repeat With" loop with a contained "If" action.