


To see all available commands: LFTP Commandsįor information, ls, pwd. If you want to escape some arguments because you used "escape: false" in the options: ftps.escapeshell( 'My folder') Įxecute a command on the remote server: ftps.raw( 'ls -l') Parallel: true / Integer, // optional, default: false upload: true, // optional, default: false, to upload the files from the locaDir to the remoteDir filter: /\.pdf$/, // optional, filter the files synchronized Here are some of the chainable functions : ftps.ls()įtps.put(pathToLocalFile, ) // alias: addFileįtps.get(pathToRemoteFile, ) // download remote file and save to local path (if not given, use same name as remote file), alias: getFileįtps.rm(file1, file2. Defaults to 1 requiresPassword: true, // Optional, defaults to true autoConfirm: true, // Optional, is used to auto confirm ssl questions on sftp or fish protocols, defaults to false cwd: '', // Optional, defaults to the directory from where the script is executed additionalLftpCommands: '', // Additional commands to pass to lftp, splitted by ' ' requireSSHKey: true, // Optional, defaults to false, This option for SFTP Protocol with ssh key authentication sshKeyPath: '/home1/phrasee/id_dsa', // Required if requireSSHKey: true, defaults to empty string, This option for SFTP Protocol with ssh key authentication sshKeyOptions: '' // ssh key options such as 'StrictHostKe圜hecking=no'įtps.cd( 'some_directory').addFile(_dirname + '/test.txt').exec( console.log) Defaults to 5 retryMultiplier: 1, // Optional, Multiplier by which retryInterval is multiplied each time new attempt fails. Defaults to 10 retryInterval: 5, // Optional, Time in seconds between attempts. default: 'ftp' // protocol is added on beginning of host, ex : s in this case port: 22, // Optional // port is added to the end of the host, ex: s in this case escape: true, // optional, used for escaping shell characters (space, $, etc.), default: true retries: 2, // Optional, defaults to 1 (1 = no retries, 0 = unlimited retries) timeout: 10, // Optional, Time before failing a connection attempt. password: 'Test', // Required if username is not empty, except when requiresPassword: false protocol: 'sftp', // Optional, values : 'ftp', 'sftp', 'ftps'. Host: '', // required username: 'Test', // Optional.

Windows ( Chocolatey) C:\> choco install lftp You need to have the executable lftp installed on your computer. FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.
