SMB2 using smbclient icon

SMB2 using smbclient

Interact with SMB shares using the smbclient CLI

Rename / Move File

AI-generated

Summary

Rename or move a file or folder on an SMB share using the smbclient CLI.

Inputs

  • Smbclient Path — Specify a custom path to the smbclient binary if it is not available in the system PATH.
  • Remote Path (required) — The current path of the file or folder to be renamed or moved on the SMB share.
  • New Path (required) — The new path or name for the file or folder after renaming or moving it.
  • Overwrite If Exists — If set to true and the destination path already exists as a file, delete the existing file before renaming. Overwriting existing directories is not supported.

Output shape

a single JSON object per item

The output JSON contains keys 'oldPath', 'newPath', 'renamed' (true), and 'overwritten' (true if an existing file at the new path was deleted before rename, false otherwise). Throws a NodeOperationError on failure.

Links

Discussion