# ftp-cmd-upload **Repository Path**: rockyCode/ftp-cmd-upload ## Basic Information - **Project Name**: ftp-cmd-upload - **Description**: Build files and upload to ftp server - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-24 - **Last Updated**: 2022-09-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ftp-cmd-upload Build files and upload to ftp server ###1.create ftp.config in root #### ftp.config the file is in soucefiles,jsonn5 config. Config the file, it will remove the `remotePath` first,and make sure the `MLSD` is `disenable` the remotePath must start with `/` ```json5 { uploadconfig: { uploadPath: './dist/', /** the local path to upload **/ ftpConnectConfig: { user: 'test', host: '127.0.0.1', port: 21, password: '131415926', }, remotePath: '/testdist', /** the ftp server path to upload, must start with / **/ ignoreList: ['upload','update'] /**this folders will not be removed **/ } } ``` ###2.create *.js to start(you can use `node *.js`) upload ```ts const tools = require('ftp-cmd-upload'); Start(); async function Start(){ await tools.cmdTool.Run('npm run build'); // run the build action await tools.ftpTool.UploadFiles(); //start to upload } ```