Put -r is not working in SFTP

Hi Folks,

I am trying to copy a directory along with sub-directories to SFTP server.

I have connected to SFTP and tried to run the below command:

sftp> get -r abc/*

It is throwing the error Invalid flag -r

Can you please let me know the ways to copy a directory from Local to SFTP

Hello kirans.229,

Systems is saying correct only. You need not to use -r option, so here is an example which I tried on my test server to download files by using sftp to my current server.

sftp singh_user@chumma_server
Connecting to chumma_server...
singh_user@chumma_server's password:
sftp> get /my/script/learning/*
Fetching /my/script/learning/array_example.php to array_example.php
/my/script/learning/array_example.php                                                                                          100%  149     0.2KB/s   00:00
Fetching /my/script/learning/create_submit.php to create_submit.php
/my/script/learning/create_submit.php                                                                                          100%  164     0.2KB/s   00:01
Fetching /my/script/learning/fil.ksh to fil.ksh
/my/script/learning/fil.ksh                                                                                                    100%  121     0.1KB/s   00:00

I hope this helps you, please do let us know in case of any queries on same.

Thanks,
R. Singh