SMB2 using smbclient icon

SMB2 using smbclient

Interact with SMB shares using the smbclient CLI

Folder → List

AI-generated

Summary

List the contents of a specified folder on an SMB share using the smbclient CLI.

Inputs

  • Smbclient Path — Specify a custom path to the smbclient binary if it is not in the system PATH; defaults to 'smbclient'.
  • Directory — The folder path on the SMB share to list contents of; defaults to '/' (the root directory).

Output shape

A JSON object containing the queried directory path and an array of folder entries, each entry including properties such as name, size, date, time, attributes, and a boolean isDirectory flag.

Entries named '.' and '..' are excluded. Also filters out entries that resemble block counts or are purely numeric. The output JSON structure is { directory: string, entries: Array<{name:string, size:number, date?:string, time?:string, attributes:string[], isDirectory:boolean}> }.

Examples

Example 1: List root directory contents

Set Directory to '/' (or leave as default). The node will return all files and folders within the SMB share's root directory, each with metadata including size and timestamps.

Links

Discussion