- pascual14
- Joined:
- Posts:
- 7
- Location:
- España
FTPs connection
Advertisement
Hello, is it possible to create an FTPs connection to send and receive files and this can be automated from the access VBA code with WinSCP or PuTTY? Thank you
Advertisement
-
martin◆
Site Admin - Joined:
- Posts:
- 41,263
- Location:
- Prague, Czechia
Re: FTPs connection
Please start here:
Automate file transfers (or synchronization) to FTP server or SFTP server
Automate file transfers (or synchronization) to FTP server or SFTP server
FTPs Connection
Hello, but I don't need sFTP but with FTPs, which is different due to the security issue, since this is for Windows servers. If I'm not mistaken it's not the same. Thank you.
-
martin◆
Site Admin
Re: FTPs Connection
That does not matter, WinSCP supports all of them (FTP/FTPS/SFTP). The script would be mostly the same, you just pick the right protocol.
Ok, I understand, and can it be integrated to send and receive from access with VBA? maybe with PuTTY? Thank you.
Advertisement
-
martin◆
Site Admin
Of course, VBA can run external programs.
I do not think PuTTY is relevant here.
I do not think PuTTY is relevant here.
FTPs connection
Hello, I'm lost, and you don't have any example of VBA code to use WinSCP and connect to an FTPs server and send a file and receive? Thanks.
-
martin◆
Site Admin - Joined:
- Posts:
- 41,263
- Location:
- Prague, Czechia
Re: FTPs connection
There are zillions of questions on vba+winscp on Stack Overflow.
For instance:
For instance:
FTPs connection in vba access
Ok, and once I have the connection configured in WinSCP, can I export that session to a script to execute it from the VBA command line? Right now I wouldn't know how to create that script with the configuration I have. Thank you
Advertisement
-
martin◆
Site Admin
Re: FTPs connection in vba access
Yes, the link I've posted above shows how:
https://winscp.net/eng/docs/guide_automation#generating
https://winscp.net/eng/docs/guide_automation#generating
- pascual14
- Joined:
- Posts:
- 7
- Location:
- España
Know if the connection has been correct
Hello, thanks for your help, it is being useful to me. I have already managed to create a script and run it from access. Now I have the doubt of how I can know if a file has been uploaded correctly or if the connection has been successful or has failed. When executing the script I create the log file and if I open it there I see it, but before with the wininet.dll ftp libraries there were functions like
InternetConnect
, FtpPutFile
or FtpGetFile
that returned a boolean value to know if the connection had been correct, the up or down, can't you do something like that with WinSCP? First connect, see if the connection has been successful, then upload a file and see if it has been uploaded correctly. Thanks for the help.
-
martin◆
Site Admin
Re: Know if the connection has been correct
@pascual14: WinSCP .NET assembly methods as most .NET APIs throw an exception on error. Though see https://winscp.net/eng/docs/library_session#results. Just follow the examples.
FTPs connection
Ok and with Access VBA you can't do this?
Advertisement
-
martin◆
Site Admin
Re: FTPs connection
Advertisement
You can post new topics in this forum