Topic "Auto Upload"

Author Message
Schursch
[View user's profile]

Joined: 2008-11-07
Posts: 1
Location: Frankfurt am Main (Germany)
Hi all,

I am using WINSCP 3.6.8. and I want to upload an Excel-File by VBA automatically.


... Shell("C:\Program Files\WinSCP3\WinSCP3.exe upload@prod.gb.users.com /upload C:\test_file.xls /home/uploads/)")

It works fine until the message-box (Copy) appears where I have to confirm it manually.

It would be nice if someone knows how to disable the message box or how to change the command.

Thanks in advance and kind regards,

Schursch
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Use /defaults or use scripting. In any case, you need to upgrade.
_________________
Martin Prikryl
Highage

Guest


here is part of my code:

Print #lInt_FreeFile01, "option batch on"
Print #lInt_FreeFile01, "option confirm off"
Print #lInt_FreeFile01, "open xxx.xxx.edu"
Print #lInt_FreeFile01, "xxxx"
Print #lInt_FreeFile01, "xxxx"
Print #lInt_FreeFile01, "cd public_html/"
Print #lInt_FreeFile01, "option transfer binary"
Print #lInt_FreeFile01, "put " & ThisWorkbook.Path & "\jw\test1.txt"

but still search on ...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Highage wrote:
here is part of my code:

...

but still search on ...

And what problem do you have?
_________________
Martin Prikryl
Highage
[View user's profile]

Joined: 2008-12-19
Posts: 1
Location: MO
I tested back and forth and figured out. I used windows FTP command to set up a VBA module to do auto FTP a few days ago. But later on I realized I need to do SFTP so I find out Winscp. But the script has to be changed.

The change is primarily:

...shell(...winscp.com /script=script.txt)

and open user:password@sftp.com is also structurally different from my previous script.

Now it is working on my side and I need to do test with SFTP account of real customers.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
See how to use WinSCP .NET assembly from VBA:
https://winscp.net/eng/docs/library_vb
_________________
Martin Prikryl
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