Transfer MATLAB code into sftp remote server from local machine to host machine.
Show older comments
I am new to this environment. I have been trying to transfer my Matlab code from my local machine to host machine. but it is showing an error as "not a regular file".
I have used many commands like put path of local machine it showed an error of not a regular file. I have attached the image of error I'm getting while am trying to transfer.

Answers (1)
Walter Roberson
on 7 Mar 2019
0 votes
sftp cannot transfer an entire directory with a put command: it can only transfer files.
You can use tar or gzip or cpio to create an archive of the files, and put that archive, and unarchive on the destination machine.
But probably you should just go back to the shell and use scp or rsync at the shell, rather than trying to execute those within sftp.
1 Comment
Walter Roberson
on 7 Mar 2019
If you look in your image to the rsync line, try typing the line you have there at your shell.
I suspect you are on Mac; if so then it would be the Terminal app that you would open and type that rsync command into.
Categories
Find more on FTP File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!