Topic "upload from local dir to SFTP folder"

Author Message
Welshhop
[View user's profile]

Joined: 2014-03-31
Posts: 6
Location: UK
Hi, i am trying to use the following script to upload some files to our SFTP server but it is failing.
Can anyone help please?

cd c:\Program Files (x86)\winscp
winscp.exe /console /Command "option batch abort" "option confirm off" "open sftp://User:Password@IP:22/" "put C:\QVS\Logs\Sessions*.log /QlikView/QlikView User Logs" "close" "exit" /log="C:\veoliadata\LogTransfer.log"

I have attached the log.
Thanks Smile
LogTransfer.log (8.84 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You are missing quotes around the path with spaces:

winscp.exe ... "put C:\QVS\Logs\Sessions*.log ""/QlikView/QlikView User Logs""" ...

See
https://winscp.net/eng/docs/scripting#syntax
https://winscp.net/eng/docs/commandline#syntax
Welshhop
[View user's profile]

Joined: 2014-03-31
Posts: 6
Location: UK
Thats great, its now working! thanks very much!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License