I'm new to SFTP servers, I was able to read my file from remote SFTP server and able to process the data. Now my major concern is how to move the file in Archive folder in the same remote server.
I'm using Nodejs and ssh2-sftp-client to connect the server and read the files.
directory |- main |- Archive |- file.txt
Thanks in advance for the your replies.
There are multiple ways we can achieve the goal here is my suggestion.
we can use get function to push the file from the source or buffer/stream from nodejs code to give remote path location of server [works only for small and mid level files]
Kindly use nodejs native stream with stream processing to handle huge file sizes, i.e. we read, process, and write a stream.Note: ssh2-sftp-client support nodejs native stream by providing steam options to lib functions
Hope that answers, If you want additional idea reply in comments.
Regards,
Muhamed