Online Documents
English
English
  • First Launch Experience
  • Activate Software License
  • How to Train EMILY?
  • Simple Web Automation
  • Web Automation Tools
  • Web Automation Processor
  • User Fill
  • Workspace Script
  • File Exporter
  • File Enumerator
  • EXCEL Processor
  • EXCEL Analyzer
  • EXCEL Writer
  • EXCEL Filler
  • CSV Creator
  • PowerShell
  • PDF Analyzer
  • Mail Sender
  • Mail Reader
  • Exchange Mail Sender
  • Exchange Mail Reader
  • HTTP Analyzer
  • Command Line
  • DOCX Templater
  • SQL Executor
  • Desktop Automation (DA)
  • SFTP
  • JSON API Server
  • Chart
  • DOCX2HTML
  • Manage Folder
  • Google Drive
  • Google Sheets
  • Google OCR
  • Google NLU
  • Azure Form Recognizer
  • Anti-Captcha
  • ChatGPT
  • Gemini
  • Schedule Trigger
  • Mail Trigger
  • File Trigger
  • API Trigger
  • Protect Text
  • Flexibility & Security
  • Announcements
    • Version Release
    • Third Party Notice
Powered by GitBook
On this page
  • HOST
  • PORT
  • USERNAME
  • PASSWORD
  • API

SFTP

Connect to the designated FTP/SFTP server to upload or download files

PreviousDesktop Automation (DA)NextJSON API Server

Last updated 1 month ago

HOST

FTP/SFTP host, which can be an IP address or a hostname.

PORT

SSH host port number, the default value is 22.

USERNAME

User account name.

PASSWORD

Password for the account.

API

In addition to providing synchronous functions like api.files(), api.read(filename, encoding='utf8'), api.write(filename, text), api.rename(oldname, newname), and api.remove(filename) for accessing files within the workspace, the module also offers an FTP object and related asynchronous functions such as api.ftp.list(path), api.ftp.get(path, filename), api.ftp.put(filename, path), api.ftp.mkdir(path), api.ftp.rename(path, newpath), and api.ftp.remove(path) as follows:

// List files or subfolders in the server root directory
let entries = await api.ftp.list('/')
console.log(entries)

// Download the file located at the path /download/test.png on the server to the workspace, and name it as 'file1.png'
await api.ftp.get('/download/test.png', 'file1.png')

// Change the filename of the file located at the path /download/test.png on the server
await api.ftp.rename('/download/test.png', '/download/testnew.png')

// Upload the file 'file2.pdf' located in the workspace to the server path /upload/file2.pdf
await api.ftp.put('file2.pdf', '/upload/file2.pdf')

// Create a subdirectory on the server at the path /upload/temp
await api.ftp.mkdir('/upload/temp')

// Delete the file located at the server path /upload/file2.pdf
await api.ftp.remove('/upload/file2.pdf')

--

We are dedicated to improving our content. Please let us know if you come across any errors, including spelling, grammar, or other mistakes, as your is valuable to us! 🤖️⚡️

feedback