Transfer MATLAB code into sftp remote server from local machine to host machine.

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.
Error.png

Answers (1)

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

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.

Sign in to comment.

Tags

Asked:

on 7 Mar 2019

Commented:

on 7 Mar 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!