Topic "Problem with the PUT command"

Author Message
DWVZ2000
[View user's profile]

Joined: 2015-07-27
Posts: 7
Location: USA
I am having a problem putting a file to an SFTP site using the PUT command.
I am new with Winscp, but I have used the Put command successfully in other scripts. I am using Winscp Version 5.7.4 and Windows 7. Below are the two scripts that I have tried. I get folder/file not found or some other messages.

1st One:
="C:\Program Files\WinSCP\WinSCP.exe /console /command ""option confirm off"" ""open MySession"" ""put \\abc-dr\DailyFiles\Inpatients Daily Report-"%%TimeStamp#yyyy-mm-dd%%".csv"" "

2nd One:
="C:\Program Files\WinSCP\WinSCP.exe /console /command ""option confirm off"" ""open MySession"" ""put \\abc-dr\DailyFiles\Inpatients Daily Report-" & Format(Now(),'yyyy-mm-dd') & ".csv"" "

Thanks for any help you can give.

David
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
The local path contains spaces, so you have to quote it.
See https://winscp.net/eng/docs/commandline#syntax
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