mscdex / node-ftp

An FTP client module for node.js
MIT License
1.13k stars 246 forks source link

Can we move file from one folder in FTP to another Folder? #189

Open dsouzamanish opened 7 years ago

dsouzamanish commented 7 years ago

Lets Say i have a filenameA in /files/ folder. After processing this file i want to move it to /processed folder.

Do i have to download-delete-upload to new folder? Is there an endpoint for the same?

thiagohagy commented 5 years ago

You can use the rename() function, worked for me


conn.rename(oldPath, newPath, (err)=> {
    console.log(err)
})