Skip to content

File Rename — Reference

Reference · Advanced · Server Connect

Rename a server file in its current directory using a filename template.

Rename a server file in its current directory using a filename template.

  • A Server Connect action and a dedicated test file/folder that the server process can access. Protect the endpoint before exposing private file operations.

Rename a server file in its current directory using a filename template.

Use an application-relative path beginning with /. In a standard Node.js project, /public/uploads/example.txt is a server path while /uploads/example.txt is its public URL. PHP paths are relative to the application root determined by its runtime. Verify the active target with the file picker instead of copying a path between server models. Do not accept unrestricted user input as a filesystem path.

Setting Meaning
NameNames the operation’s result for later server steps when it returns one. See the result notes for this operation; not all file actions return the same type.
File PathThe application-relative path of the server file. This is not the browser’s local file-picker path or an HTTP URL.
TemplateThe new filename template. For example, {name}-thumb{ext} preserves the source extension and adds a suffix. Do not add a second dot before {ext}.
OverwriteAllows replacing an existing destination. Default off. Copy/Move can choose a unique name when off; Rename with a fixed existing target can fail instead.
Output ResultIncludes a named returned result in action output when applicable. Default off. Check the operation’s actual return type; Download sends the file response instead.

For a test image photo.jpg, use Template {name}-thumb{ext}. The resulting filename is photo-thumb.jpg. Check the returned path and file contents before using the new path in another step.

The template changes a filename, not a destination folder. {name} excludes the extension and {ext} includes its leading dot. {guid} generates an identifier. The collision token {_n} uses different separators in the installed runtimes: Node.js inserts the number directly, while PHP inserts an underscore and number. Overwrite off rejects an existing fixed target name.

A returned path or URL is not an access-control decision. Keep private file reads and writes behind server-side identity and ownership checks, and update any database metadata only after the intended file operation succeeds.

You can configure the path and verify the returned result or file effect without confusing it with a page URL or database update.