How to rename a file with sftp get command

10,977

no need any params, just

sftp> get hello.txt byebye.txt
Share:
10,977
Lucia Belardinelli
Author by

Lucia Belardinelli

Updated on June 14, 2022

Comments

  • Lucia Belardinelli
    Lucia Belardinelli almost 2 years

    Is there a way to use a "get" command in sftp to get a folder without obtaining "Cannot download non-regular file:..../dir_name" or to get a file and save it with another name?

    In the second option I mean:

    sftp> ls
    hello.txt
    sftp> get hello.txt (+ something) byebye.txt
    sftp> exit
    

    And in my directory I have byebye.txt.

  • Lucia Belardinelli
    Lucia Belardinelli about 12 years
    and if I need a multiple get like get all files with that last date modified and all the got file should end with that date? ... how can I do something like this? Thanks in advance
  • notAChance
    notAChance over 5 years
    This simply does not work for me. sftp just downloads the original file without changing the name. Tectia Client 6.3.11