Is it possible to save a folder with SFTP?

-1

I've uploaded a folder with extension .zip via a web interface and I want to save via SFTP so that a perl script can retrieve the folder, unzip it, and execute some instructions.

I've found these two utilities, ssh2_scp_send and ssh2_scp_recv, but they are related to files, not folders. Can anyone help?

user185397

Posted 2013-01-08T17:34:41.167

Reputation: 9

Question was closed 2013-01-08T19:48:13.230

A folder with a ".zip" extension is not a folder, but just a single ZIP file. You can send it like any other file. Where have you uploaded it to? A server you control? Where do you want to save it via SFTP? Programming questions, e.g. with PHP are off topic on Super User though. Please consider asking a more specific example with the code you're already using over on [SO]. – slhck – 2013-01-08T19:48:11.110

Answers

1

SFTP does not work for getting an entire directory/folder. You should use SCP instead with the command: scp -r user@host:/the/path/

Kruug

Posted 2013-01-08T17:34:41.167

Reputation: 5 078