FTP Client
Full-featured FTP/FTPS client skill for OpenClaw. Connect to remote FTP servers and manage files directly.
Environment Variable
Set FTP_CONNECTION in the OpenClaw skill management panel. Format (comma-separated, last 3 fields optional):
CODEBLOCK0
Examples:
CODEBLOCK1
Field definitions:
- - Field 1 (required):
host:port — FTP server address and port - Field 2 (required):
username — FTP login username - Field 3 (required):
password — FTP login password - Field 4 (optional):
active or passive — connection mode (default: passive) - Field 5 (optional):
ftp or ftps — protocol (default: ftp) - Field 6 (optional):
explicit or implicit — TLS mode for FTPS (default: not used; only meaningful when field 5 is ftps)
Note: If your password contains commas, replace them with %2C (URL-encoded). The parser will decode it.
List directory
CODEBLOCK2
Options:
- -
--long or -l: Show detailed file info (size, date, permissions)
Download file
CODEBLOCK3
Options:
- -
--out <path> or -o <path>: Local destination path (default: temp directory) - INLINECODE18 or
-d: Download entire directory recursively
Upload file
CODEBLOCK4
Options:
- -
--to <path> or -t <path>: Remote destination path (default: FTP root /) - INLINECODE23 or
-d: Upload entire directory recursively
Delete file or directory
CODEBLOCK5
Options:
- -
--dir or -d: Remove directory recursively (including all contents)
Move / Rename
CODEBLOCK6
Copy file
CODEBLOCK7
FTP protocol does not natively support copy. This downloads the file to a temp location and re-uploads it.
Create directory
CODEBLOCK8
Creates the directory and all intermediate directories as needed.
Read file content
CODEBLOCK9
Options:
- -
--encoding <enc>: File encoding (default: utf8). Supports: utf8, ascii, latin1, INLINECODE32
File info (size, date)
CODEBLOCK10
Returns file size and last modification date.
Notes
- - Requires
node and uses the basic-ftp npm package (auto-installed via package.json). - Set
FTP_CONNECTION env var before use. - Passive mode is recommended for most NAT/firewall scenarios.
- For FTPS, the skill supports both explicit (port 21 typical) and implicit (port 990 typical) TLS.
- Large file transfers show progress output.
FTP 客户端
适用于OpenClaw的全功能FTP/FTPS客户端技能。可直接连接远程FTP服务器并管理文件。
环境变量
在OpenClaw技能管理面板中设置 FTP_CONNECTION。格式(逗号分隔,最后3个字段可选):
host:port,username,password,active/passive,ftp/ftps,explicit/implicit
示例:
ftp.example.com:21,myuser,mypassword
ftp.example.com:21,myuser,mypassword,passive
ftp.example.com:990,myuser,mypassword,passive,ftps,implicit
字段定义:
- - 字段1(必填):host:port — FTP服务器地址和端口
- 字段2(必填):username — FTP登录用户名
- 字段3(必填):password — FTP登录密码
- 字段4(可选):active 或 passive — 连接模式(默认:passive)
- 字段5(可选):ftp 或 ftps — 协议(默认:ftp)
- 字段6(可选):explicit 或 implicit — FTPS的TLS模式(默认:不使用;仅当字段5为ftps时有效)
注意: 如果密码包含逗号,请用 %2C(URL编码)替换。解析器会自动解码。
列出目录
bash
node {baseDir}/scripts/list.mjs
node {baseDir}/scripts/list.mjs /remote/path
node {baseDir}/scripts/list.mjs / --long
选项:
- - --long 或 -l:显示详细文件信息(大小、日期、权限)
下载文件
bash
node {baseDir}/scripts/download.mjs /remote/file.txt
node {baseDir}/scripts/download.mjs /remote/file.txt --out /local/path/file.txt
node {baseDir}/scripts/download.mjs /remote/dir --dir
选项:
- - --out <路径> 或 -o <路径>:本地目标路径(默认:临时目录)
- --dir 或 -d:递归下载整个目录
上传文件
bash
node {baseDir}/scripts/upload.mjs /local/file.txt
node {baseDir}/scripts/upload.mjs /local/file.txt --to /remote/path/file.txt
node {baseDir}/scripts/upload.mjs /local/dir --dir --to /remote/dir
选项:
- - --to <路径> 或 -t <路径>:远程目标路径(默认:FTP根目录 /)
- --dir 或 -d:递归上传整个目录
删除文件或目录
bash
node {baseDir}/scripts/delete.mjs /remote/file.txt
node {baseDir}/scripts/delete.mjs /remote/dir --dir
选项:
- - --dir 或 -d:递归删除目录(包括所有内容)
移动/重命名
bash
node {baseDir}/scripts/move.mjs /remote/old-name.txt /remote/new-name.txt
node {baseDir}/scripts/move.mjs /remote/file.txt /remote/subdir/file.txt
复制文件
bash
node {baseDir}/scripts/copy.mjs /remote/source.txt /remote/dest.txt
FTP协议本身不支持复制操作。此功能会将文件下载到临时位置,然后重新上传。
创建目录
bash
node {baseDir}/scripts/mkdir.mjs /remote/new-dir
node {baseDir}/scripts/mkdir.mjs /remote/path/to/deep/dir
按需创建目录及其所有中间目录。
读取文件内容
bash
node {baseDir}/scripts/read.mjs /remote/file.txt
node {baseDir}/scripts/read.mjs /remote/file.txt --encoding utf8
选项:
- - --encoding <编码>:文件编码(默认:utf8)。支持:utf8、ascii、latin1、base64
文件信息(大小、日期)
bash
node {baseDir}/scripts/info.mjs /remote/file.txt
返回文件大小和最后修改日期。
注意事项
- - 需要 node 环境,并使用 basic-ftp npm 包(通过 package.json 自动安装)。
- 使用前请设置 FTP_CONNECTION 环境变量。
- 对于大多数NAT/防火墙场景,建议使用被动模式。
- 对于FTPS,该技能支持显式(通常端口21)和隐式(通常端口990)TLS。
- 大文件传输时会显示进度输出。