Question

I'm looking for a way to upload files/dirs structure from one server to another.. The only way it's possible in my case is SFTP upload, is there any easy way to upload it, using script or something without making archive of files/dirs, I want to recreate on remote server?

Thank you!

Was it helpful?

Solution

Perhaps a solution could be found using recursive scp (scp -r)? Or are you limited explicitly to sftp only?

There's also a client named lftp which has sftp and scripting support - much like batch file I would imagine - a list of ftp commands. (http://lftp.yar.ru/lftp-man.html)

OTHER TIPS

You may want to consider Syncplify.me FTP Script! as a solution. It allows you to write very simple scripts to achieve your goal. For example, uploading an entire directory to a remote SFTP server would actually be a single line of code added to one of the ready-made templates. http://www.syncplify.me/products/ftp-script/

edtFTPj/PRO is a Java SFTP client that has a comprehensive scripting engine. Being Java you can run it on any platform where Java is supported.

Here's some more details on the scripting support. It has an 'mput' command that uploads all the files in the current directory to the remote directory.

Recursive transfers aren't yet supported, but could easily be added if required - email support if you are interested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top