Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

steph07

batch upload ftp file with private key

Hello,

I try to create script batch. I want to uploading files via sftp with private key.

Host SFTP : 213.190.xx.xxx
User : user01
Use private key : PrivateKey

Task : recover the template_fichier*.xlsx in directory \\id-bi-np\c$\Shared_folder\export_BVA and send to SFTP de BVA

option echo off
option batch on
option confirm off
open sftp://user01@213.190.78.147:990/ -privatekey=C:\Temp\Cle_SSH_BVA\PrivateKey.ppk
option transfert binary
 
# Change LOCAL directory
lcd "\\id-bi-np\c$\Shared_folder\export_BVA"
# copy an entire folder
put -nopermissions -nopreservetime "outgoing"
exit


error message :

C:\Script\enquete_bva>deploy.bat

echo off
batch on
confirm off
Searching for host...
Network error: Connection to "213.190.78.147" timed out.
Unknown option 'transfert'.


Can help.
Best regards.

Parkendol